Domanda

I'm implementing silent printing on network printers through Java Print Service and IcePDF. I have added two network printers A and B to my development machine.

When I submit print job to printer A, it prints file without any issue, the same job submitted to printer B then it throws Exception in thread "main" java.awt.print.PrinterException: The handle is invalid.

at sun.awt.windows.WPrinterJob._startDoc(Native Method)
at sun.awt.windows.WPrinterJob.startDoc(WPrinterJob.java:1249)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1371)
at org.tgslc.print.PDFRenderTest.main(PDFRenderTest.java:70)

print document type is PDF document. Printer A is HP LaserJet 9050 PS Printer B is IBM Infoprint 2190 PS High speed printer.

Any help would be appreciated.

È stato utile?

Soluzione

"The handle is invalid" message is not specific to Java. Try to print to that printer from other program (Notepad/Word) from the same computer. It could be problem with printer settings or driver.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top