Having trouble printing with JPS, Invalid flavor

Discussion in 'Java' started by Brennan Mann, Jul 3, 2004.

  1. Brennan Mann

    Brennan Mann Guest

    Hello,

    I am trying to print a String. I am getting the following error:

    sun.print.PrintJobFlavorException: invalid flavor at
    sun.print.Win32PrintJob.print(Unknown Source)

    private void doPrint( int service )
    {
    try {


    PrintService ps = printServices[service];

    DocPrintJob job = ps.createPrintJob();

    Doc doc = new SimpleDoc(print,
    DocFlavor.STRING.TEXT_PLAIN, null );

    job.print( doc, attributeSet );

    } catch( PrintException pe ) {
    pe.printStackTrace();
    }
    }

    // print is a String...

    Any Suggestions?


    --
    Thanks,
    Brennan



    954-537-9460 ext. 213
     
    Brennan Mann, Jul 3, 2004
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?ISO-8859-1?Q?J=F6rg_Marti?=

    JPS 1.4: unit of measurement in the printDialog()

    =?ISO-8859-1?Q?J=F6rg_Marti?=, Aug 12, 2003, in forum: Java
    Replies:
    0
    Views:
    455
    =?ISO-8859-1?Q?J=F6rg_Marti?=
    Aug 12, 2003
  2. MattC
    Replies:
    1
    Views:
    3,083
    Thomas Weidenfeller
    Jul 25, 2005
  3. Przemek Klein
    Replies:
    0
    Views:
    482
    Przemek Klein
    Oct 6, 2005
  4. Thomas Feuerstack
    Replies:
    1
    Views:
    1,078
    Thomas Weidenfeller
    Dec 14, 2005
  5. Christoph Haas
    Replies:
    24
    Views:
    858
  6. nalakainfo
    Replies:
    2
    Views:
    412
  7. Replies:
    7
    Views:
    785
  8. kurt krueckeberg

    What flavor of does C++11 support

    kurt krueckeberg, Sep 24, 2013, in forum: C++
    Replies:
    25
    Views:
    821
    Melzzzzz
    Oct 16, 2013
Loading...