Open sKY02644 opened 2 years ago
I TRIED THE PRINTER FROM A DIFFERENT MACHINE AND IT PRINTED SO THE PRINTER IS NOT FAULTY
I ALSO TRIED TO USE THE SAME JAVA VERSION GOT THE SAME BEHAVIOUR
IM REALY CONFUSED
I JUST NOTICED ANOTHER MACHINE IS HAVING THE SAME PROBLEM NO ERRORS DOCUMENT IS BEEN SENT TO PRINTER BUT ITS NOT PRINTING
Hi @sKY02644 , We have some clues.
Ok, if are you using PrinterOutputStream, it can be reproduced by installing one printer on system (with no real printer connected to it)
How to reproduce: In my ubuntu machine, I have one good and real printer installed (TM-T20), and other fake printer (CUPS-BRF-Printer) as you can see on screenshot.
Both printers is listed on PrinterOutputStream.getListPrintServicesNames(), and can be used as "printer name" without error, but only TM-T20 send content to the printer!
java -jar getstart-4.1.0-jar-with-dependencies.jar
Usage: java -jar getstart.jar ("printer name")
Printer list to use:
CUPS-BRF-Printer
TM-T20
Solution If it is your case, the solution is simple: just ensure that the printer is correctly installed on the system.
@anastaciocintra THANK YOU FOR THE QUICK REPLY
PrintService printService = PrinterOutputStream.getDefaultPrintService();
I AM ACTUALLY USING THE PrinterOutputStream
AND THE PRINTERS ARE XPRINTER PRINTERS THE PRINTERS ARE INSTALLED CORRECTLY
THE APPLICATION HANGS AWAITING FOR THE PRINTING TO COMPLETE BEFORE IT CONTINUES AND SINCE THE COMMAND IS SENT TO THE PRINTER BUT ITS NOT PRINTED
ALSO THE MACHINES PRITING , I JUST NOTICED ARE THE MACHINES WE USE FOR DEVELOPMENT WHEN WETEST THE PRODUCTION VERSION ON OTHER MACHINES IT SENDS COMMAND TO PRINTER AND SHOWS PRINTING STATUS BUT NEVER PRINTS
@sKY02644 , I could be wrong, and that we have a bug in the lib, but, In my humble opinion, you have environment differences, something like:
QUICK SIDE NOTE WE ARE CALLING THE JAR FILE FROM AN ELECTRON APP WHICH WE USING THE java-caller MODULE
TO CALL THE JAR FILE
ALL JAVA VERSIONS ARE THE SAME ACROSS ALL THE MACHINES
THIS JAR FILE READS A .JONS FILE WHICH IT DOES AND GENERATES THE RECEIPTE AND SENDS IT TO THE DEFAULT PRINTER
Steps to Reproduce
just strange behaviour
Evidences
SO EVERY THING IS WORKING FINE EVEN AFTER BUILD FOR PRODUCTION BUT THERE IS ONE MACHINE THAT SHOWS PRINTING THE DOCUMENT BUT THE DOCUMENT IS NEVER PRINTED AND NO ERRORS ARE SHOWN TO.
PLEASE ASSIST ME DEBUG IM KINDA CONFUSED