Mega Code Archive

 
Categories / Delphi / Printing
 

Detecting print errors

Question: How can I detect printing errors(like the printer is out of paper) when printing from my application? Answer: Print jobs are generally added to the Windows print spooler, where the job will be spooled to the printer at some future time (perhaps even after your application has been shut down). Even if the spooler is not used, it is the print driver that takes the responsibility of dealing with errors at the printer level. The only way to handle printer errors at application level is to print to a dedicated printer through a custom device driver that is built for that specific printer.