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. Advertising

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. MattC
    Replies:
    1
    Views:
    2,587
    Thomas Weidenfeller
    Jul 25, 2005
  2. Thomas Feuerstack
    Replies:
    1
    Views:
    883
    Thomas Weidenfeller
    Dec 14, 2005
  3. Christoph Haas
    Replies:
    24
    Views:
    653
  4. nalakainfo
    Replies:
    2
    Views:
    324
  5. Replies:
    7
    Views:
    587
Loading...

Share This Page