The pykota filter
Last modified on $Date$
To account for pages or eventually ink usage, you must plug your accounting
system into CUPS. One way to do this without having
to modify CUPS itself, is by using a filter.
A filter is a computer program which takes data in one format as its input, and outputs the
same data but transformed into another format. CUPS already
contains many filters. For example there's one filter named pstops which accepts
PostScript data as its input, and, as its name implies, outputs PostScript data too, but after having
eventually rearranged the pages to fit several pages on a single sheet of paper, or other manipulations
like that.
The pstops filter described above is also in charge of doing basic page
accounting, but PyKota currently doesn't use this facility since it may
prove to be unreliable depending on the drivers used or if a paper jam occur for example.
So to do its own accounting, PyKota has its own filter, named pykota,
which you have to plug into the different set of filters used by CUPS. The procedure to
install the pykota filter is described in the
chapter.
Currently the pykota filter is used at the very last stage of the print mechanism,
just before the final data is sent to the printer, but it may eventually be used earlier with some
modifications to CUPS's filtering configuration. This is not tested yet, but this
may be the solution to use PyKota with printers which really needs to have
a *cupsFilter line in their PPD file, i.e. non-postscript printers.
The pykota filter really is the only thing which depends on CUPS,
so it is probable that a next version of PyKota will support other printing environments.