Improving error reporting from backends

Erik de Castro Lopo mle+cups at mega-nerd.com
Tue Nov 13 16:10:54 PST 2007


> Do you mean that in the backend I can do things like:
>
>    fprintf (stderr, "STATE : Out of paper.\n") ;

Ok, the following works:

    fprintf (stderr, "STATE: Out-of-paper\n");

For some reason CUPS doesn't like whitespace in there.

> If so, what else can a backend report? Is this documented somewhere?

I'm still curious about that.

Anyway, the backend I'm using can now inform CUPS that it is out of paper. Now I'm curious as to how the printer can inform CUPS that it now does have paper. After paper is restored, CUPS is of the opinion that the printer remains as:

    printer-state         : stopped
    printer-state-reasons : Out-of-paper

Whats more, if I do "cupsenable <printer name>" I now get this:

    printer-state         : idle
    printer-state-reasons : Out-of-paper

However, the next print job does clear out the state.

Any further clues appreciated.

Cheers,
Erik





More information about the cups-devel mailing list