count pages

Helge Blischke H.Blischke at srz-berlin.de
Sat Jul 31 09:08:10 PDT 2004


Tarik Benabid wrote:
> 
> Hi :)
> 
> how can we count pages?
> 
> as I saw, pstops is approximate, and with a win client we got 1 page
> 
> ==============
> 
> printer anonymous 98 [28/Jul/2004:12:12:58 +0200] 1 1 - winClient
> 
> ==============
> 
> any script? or function ?
> ( we suppose the printer have a counter )
> 
> Regards
> 
> . thanks to PJ and Mike :) for the post about how to hold jobs

As long as CUPS does not yet support backchannel data from the
printer(s)
(the only backend I know of which permits this is the hpnpf backend), 
you may
(1) rely on pstops, provided the jobs are _really_ DSC compliant.
(2) use pyKota, which seems quite comfortable, but relies on DSC
compliance as well.
(3) write a filter of you own as a script feeding the job(s) through 
    Ghostscript's bbox device anc capturing Ghostscript's stdout. You'll
    find there two bounding box lines for each and every page in the
job.
    This even works for "obfuscated" PostScript.

Helge

-- 
H.Blischke at srz-berlin.de
H.Blischke at srz-berlin.com
H.Blischke at acm.org




More information about the cups mailing list