pkpgcounter's homepage
Page Description Language parser
pkpgcounter is both a command line tool and a Python library distributed under the terms of the GNU General Public License of the Free Software Foundation, version 3 or higher.
pkpgcounter is a generic Page Description Language parser which can either count the number of pages or compute the percent of ink coverage needed to print various types of documents.
It currently recognizes the following file formats :
- PostScript (both DSC compliant and binary)
- PCL3/4/5
- PCLXL (aka PCL6)
- DVI
- OpenDocument (ISO/IEC DIS 26300)
- Microsoft Word (c) (tm) (r) (etc...)
- Plain text
- TIFF
- Several other image formats
- ESC/P2
- Zenographics ZjStream
- Samsung QPDL (aka SPL2)
- Samsung SPL1
- ESC/PageS03
- Brother HBP
- Hewlett-Packard Lightweight Imaging Device Interface Language
- Structured Fax
- Canon BJ/BJC
- ASCII PNM (Netpbm)
The ten latter ones, as well as some TIFF documents, are currently only supported in page counting mode.
By default, when launched, pkpgcounter prints on its standard output a single integer representing the total number of pages in all the files which filenames you've passed on the command line.
With no argument, or with a single dash in non-option arguments,
pkpgcounter reads datas to parse from its standard input in addition
to other non-options arguments which are treated as filenames
representing the files to parse.
See pkpgcounter --help for details and examples.
The list of the supported ghostscript drivers is available here