[cups.general] Color, page-size and duplex accounting

alet at librelogiciel.com alet at librelogiciel.com
Wed Oct 7 11:57:47 PDT 2009


Hi,

On Wed, Oct 07, 2009 at 07:52:17AM -0700, Miquel Quiles wrote:
> > Miquel Quiles wrote:
> >
> > 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.
>
> 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.

Look at http://www.pykota.com/software/pkpgcounter

it does a relaitvely good job at extracting parts of the informations
you want, especially with PCL and PXLXL (PCL6) datas (use pkpgcounter
--debug)

in the past weeks, several patches were submitted to do the same
(extract page size, duplex mode, etc...) for PostScript, although I
haven't integrated them yet. Currently it can only count pages and
extract color information from PS files.

hth

Jerome Alet





More information about the cups mailing list