Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javax.print.PrintException: Printer is not accepting job

Tags:

java

printing

I am getting the "javax.print.PrintException: Printer is not accepting job.", when I try to execute

printService.createPrintJob().print(
                    new SimpleDoc(this,
                            DocFlavor.SERVICE_FORMATTED.PRINTABLE,
                            docAttributeSet),
                    printRequestAttributeSet);

I am seeing this problem happening for one machine printing to the printer but the other machine is able to print to the same printer using the same API call. I was looking at bug report from Oracle Sun explaining similar problem which is pasted below. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6525150

But none of the workarounds mentioned there is fixing the problem for me. Any help is appreciated.

like image 477
Ajith Jose Avatar asked Dec 28 '10 16:12

Ajith Jose


1 Answers

Removing and adding the printer fixes the problem as mentioned in the bug as a workaround. It worked for me.

like image 164
Ajith Jose Avatar answered Oct 19 '22 22:10

Ajith Jose