Color, page-size and duplex accounting

Miquel Quiles miquel.quiles at uib.es
Wed Oct 7 07:52:17 PDT 2009


> Miquel Quiles wrote:
>
> > I have a couple of printers configured on my CUPS server.
> > Then I've configured a printer with Tea4CUPS backend. This printer has the
> > same driver as the "real" printers. It only picks up accounting info (such
> > as title, job-id, number of pages...) and it keeps the printjob data-file.
> >
> > Later I want to print this jobs to the "real" printers. This works great,
> > but I would like to obtain more info such as page-size (A4, A3,...),
> > duplex (yes or no) and color (color or black&white).
> >
> > How can I do this? Can you guide me?
> > Thanks in advance.
>
> I think there is no general solution, as you need to interpret the data
> stream just as the real printer does.In case of PostScript, this surely can
> be done using Ghostscript, in case of PCL (up to PCL 5) maybe using
> GhostPCL, but I don't know what kond of interpreter to use for e.g. XPS
> (aka PCL 6) or the diverse Epson printer languages etc. etc.).
>
> Some printer architectures allow gathering of "backchannel" information
> relevant for accounting, e.g. printers that understand a substantial subset
> of HP's PJL, or PS printers fed with jobs equipped with procedures to gather
> such information.
>
> Helge
>

Sorry for my ignorance, but how can I extract the info I need from the postscript file? I've installed "gs" and I can open it and see that is an A3 or an A4 document, but I would like this to be automatically with (for example) a command line. Or something similar (CUPS filters or backends) where I could pass all this info to my own script. I did some search on the Internet buy I couldn't find anything.

Thanks in advance.








More information about the cups mailing list