You are probably right that the printer doesn't recognise the contents.
DocFlavor.BYTE_ARRAY.AUTOSENSE is really no more than a way
to send a stream of bytes to your printer. If the byte stream
is a Postscript document (for example) and the printer is a PCL-only
printer then its just never going to work. Nothing we can do will
ever change that. The onus is on you to only send that content to
a device that understands it, or to first convert it into that format.
But you should consider *why* you are using AUTOSENSE at all?
That's bypassing Java and Windows printer-independent rendering.
Graphics.drawString("...") via a PrinterJob will work on any device
The listener methods presently will not tell you anything more
than the JDK internally completed sending data to the print spooler.
It will not tell you anything about whether the printing on the
device really worked.
-phil.
jav...@javadesktop.org wrote:
Hi Jennifer
Sorry I wrongly wrote it is not printString it is printContent, so now I edited
it. I am trying your suggestion but I think so the problem that my doc favor is
not recognized by printer. When I debugged my program execution goes to the
printDataTransferCompleted() and then printJobNoMoreEvents() methods of
PrintJobListener interface but string is not getting printed. I have HP
laserjet as my network printer.
Thanks for your help
Shashwat
[Message sent by forum member 'shashwat_anand' (shashwat_anand)]
http://forums.java.net/jive/thread.jspa?messageID=334130
===========================================================================
To unsubscribe, send email to lists...@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
lists...@java.sun.com and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to lists...@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
lists...@java.sun.com and include in the body of the message "help".