Skip to main content

whether my print job is successful or not?

1 reply [Last post]
Joined: 2008-03-29

hi i am new to java please suggest what is the code for whether my print job is successful or not? that is if any reason of printer problems (cartridge or paper out) the printing process not completed. at that time how can i get in java my print process is successfully completed or not?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-10-17

The print job is successful if PrinterJob's print method does not return a PrinterException. Otherwise, you may query the status of the printer by using PrintService's getAttribute method.