CUPS error states

Michael Sweet mike at easysw.com
Wed Dec 6 04:17:57 PST 2006


Bawenang wrote:
> Hi, I'm planning to make an application that can print a file. Because the application runs in realtime, I needed it to handle the printer error such as:
> 1. Printer turned off
> 2. Printer out of paper
> 3. Printer out of ink
> 4. Cannot detect printer
> 5. Paper printed but stuck inside the printer
> 
> When I consulted the CUPS Programming, I found these constants:
 > ...
> My question is: how can I handle those 5 errors above with CUPS? As I see it, there's no straightforward way to check whether a printer is out of paper or ink. So I guess I have to make another way.

CUPS supports the printer-state-reasons attribute, which lists a
series of keywords for the current printer state.  Depending on the
backend and driver you use, you may or may not get that kind of
status information back.  Look at the IPP specification (RFC 2911)
for a list of the standard keywords...

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com




More information about the cups mailing list