[cups.general] Still struggling -> Accounting
Jerome Alet
alet at librelogiciel.com
Tue May 2 07:14:08 PDT 2006
Hello,
On Tue, May 02, 2006 at 04:59:32AM -0400, Ruan wrote:
>
> (Q1) Is there a library/tool/documentation that I can use to
> interpret the spool files to extract accounting information?
Different tools might exist which are usable depending on the
file format generated by your printer driver.
To the best of my knowledge, pkpgcounter, available under the terms
of the GNU GPL from
http://www.librelogiciel.com/software/pkpgcounter/action_Presentation
is the only one which can autodetect the file format and compute
the number of pages in it.
It is available both as a standalone command line tool and as
a Python library, and recognizes the following formats :
- PostScript (both DSC compliant and binary)
- PDF
- PCLXL (aka PCL6)
- PCL3/4/5
- ESC/P2
- DVI
- TIFF
- OpenDocument (OpenOffice.org)
- Zenographics ZjStream
IMPORTANT : the PCL3/4/5 parser is far from being perfect but
works with many drivers. Future developments will add support
for the computation of ink coverage just like in PrintBill.
NB : for now, unless you use pkpgcounter --debug, you won't be able
to extract the page size and other similar informations : only the
page count is returned.
Finally, software based accounting is only an estimation : if a
paper jam occurs, you have to ensure to not overcharge your users,
and for this hardware based accounting is much better (snmp for
example).
> (Q2) Does my 3 steps sound like a possible solution?
yes
bye,
Jerome Alet
More information about the cups
mailing list