Simple accounting filter/backend (With Perl or another script language)

Nayco anonymous at easysw.com
Fri Jun 18 07:06:24 PDT 2004


Helge Blischke wrote:
> Yes, the bbox message will work for _every_ PostScript job.
> The easiest (and natural) way to call a filter like this is to list in
> as a cupsFilter: "..." in the printer's PPD.

Well, I'll use this method as a last resort, because I want adding printers to be done from the Cups interface, without touching anything manually in config files. Someone with no knowledge of the internals must be able to use it... In that way, Pykota seems to be a real good product.

> For printers that use fancy things like foomatic_rip or hpijs,
> you'd have to list this accounting filter prior to the filters that
> convert PostScript to the specific printer code.

Well, If I'm lucky, we only have Postscript printers here... Non-postscript are only used non-shared (personnal printers).

So, if I understand the whole thing, IF I only have postscript printers, THEN a Bbox-based accounting method should always work with a backend ? Great !

> If you use this approach, you don't need to wrap the existing
> backends (some rely on getting the device URI in argv[0] which isn't
> easy to perform when using script languages).

Arggghh, that's what I finded, however I couldn't believe it; I'm not very used to the concept of changing on-the-fly an executable's name... I saw this was used by unix-targeted troyans to hide themselves in "ps xau" ;-)

> And no, the PyKota method relies on the PostScript job being DSC
> compliant - at least with
> repect to the "%%Page: ..." comments, whereas the bbox method even works
> with PostScript jobs
> that contain no comments at all, moreover, it even works with binary
> PostScript.

Ok. I asked this because 'gs -bbox' is slightly slower... ;-)

Thanks for all, I start implementing, and I post the results here.






More information about the cups-devel mailing list