Having trouble printing with JPS, Invalid flavor

B

Brennan Mann

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

(e-mail address removed)

954-537-9460 ext. 213
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top