environment variable PRINTER readonly in Filters?
Michael Sweet
mike at easysw.com
Fri May 4 06:13:34 PDT 2007
Andreas Bohne-Lang wrote:
> OK - in general I would like to ask if the environment variable is
> 'readonly' for CUPS filters? It would be nice if the cups main
> routine could reload the PRINTER variable and set it to the value the
> filter changed. One example was 'short job queue'.
Environment variables are local to the process - you can't pass them
back up to the parent, they can only be inherited by a child process.
> At the moment I am working on a routine that checks the toner on the
> destination printer before printing (by
> SNMPv2-SMI::mib-2.43.11.1.1.9.1.1) and it would be nice if I could
> redirect the job to another printer by changing the variable if the
> toner is less.
The only thing you can do is send a CUPS-Move-Job request, however
that won't work while the job is in the processing state.
Another thing you can do is setup a class - then the backend can check
the toner levels and exit with status 1 to get the job printed on the
next device in the class.
--
______________________________________________________________________
Michael Sweet, Easy Software Products mike at easysw dot com
Internet Printing and Document Software http://www.easysw.com
More information about the cups-devel
mailing list