In my earlier post on Print Document Vs Printer Control language I had mentioned about the advantages of using the printers native language to improve performance of label printing. Currently I am facing issues in getting statuses of printers that we are using in the production environment.
Why we need printer status
My team is responsible for developing a central solution which is interfacing with a scheduling service. Based on the inputs received from the service our application is supposed to print labels to one of the printer connected to any of the stores within a network. Since the label printing solution is a central deployment in the form of a WCF service it becomes necessary for us to know the status of the printer.
There can be different statuses linked to a printer
- printer might be busy printing a print job
- Printer is online / offline
- There is a paper jam
- The toner is finished
- The printer is out of paper
In any of the above situations the printer should not be sent with further print requests. We use Sato CX400 printers to print labels. Unfortunately this model of printer does not support giving feedback to the program which initiated a print. We are unable to get any status of the printer. This is not possible programmatically.
Even if we switch off the printer and try printing a test print using Notepad or Word it doesn’t give any notification. The print job is stored in the printers internal queue and printed automatically when the printer is switched on again. This is a strange behaviour. In normal A4 printers like HP LaserJet and others if there is any problem while printing from Microsoft Word it gives a notification on the taskbar.
In our application we are also supposed to do the load balancing of printers programmatically. A store can have multiple printers and we should even out the load on all the printers available within the store. It becomes impossible to load balance if we don’t get response from the printer. We might end up firing dead printers to a printer if it is not functioning.
We tried alternate method like using Windows Management object to get the status of the printer. But that also doesn't seem to give correct status. Irrespective of the state of the printer, we always got the status as online or idle.
I wish there was this small capability in Sato CX400 printers to give statuses back to the calling program. We might end up using a different printer in our future project as we need this ability very badly. In the mean time if someone has any idea how to get status from Sato CX400 printers please let me know. Until next time Happy Programming :)