# $Id: README 148 2006-02-16 14:00:58Z jerome $

pkpgcounter : a generic Page Description Language parser

(c) 2003, 2004, 2005, 2006 Jerome Alet <alet@librelogiciel.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

=============================================================================

pkpgcounter is a generic Page Description Language parser.

It can currently compute the number of pages in several types of files :

        - PostScript (both DSC compliant and binary)
        
        - PDF
        
        - PCL3/4/5
        
        - PCLXL (aka PCL6)
        
        - ESC/P2
        
        - DVI
        
        - TIFF
        
        - OpenDocument (OpenOffice.org)
        
        - Zenographics ZjStream
        
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.

In the future other possibilities will be added.        

=============================================================================

Installation :
--------------

  0 - Download pkpgcounter from :
  
        http://www.librelogiciel.com/software/pkpgcounter/action_Presentation
        
      and extract it :  
      
        $ tar -zxf pkpgcounter-x.yy.tar.gz
        
        where x.yy is pkpgcounter' version number.
        
  1 - Run the installation script :
      
        $ python setup.py install
        
      This will usually install the pkpgcounter into /usr/bin and  
      the library into /usr/lib/python2.?/site-packages/pkpgpdls/
        
  2 - Use pkpgcounter :
  
      $ pkpgcounter file1.ps file2.pclxl ... <fileN.escp2
      
      pkpgcounter will display the total size in pages of all the files
      passed on the command line.
      
  3 - That's all !    
  
=============================================================================

Troubleshooting : 
-----------------

  If pkpgcounter gives incorrect results to you, please make an incorrectly
  parsed data file available to us on some website, and tell us which 
  driver was used.
  
  If pkpgcounter complain about your system lacking the Python Psyco module,
  please consider installing it to speedup file parsing. However, don't forget
  that Psyco currently only runs on the 32 bits x86 platform, so no need to 
  install it if you've got another system type.
  
=============================================================================

The PCL3/4/5 parser included in pkpgcounter is a Python backport of an early
release of the PCLCount software by Eduardo Gielamo Oliveira and Rodolfo Broco
Manin. 

Although this IS NOT needed for pkpgcounter to work, you can download the
original PCLCount software from :

    http://www.fea.unicamp.br/pclcount/
    
Their software is distributed under either the terms of a BSD-like license,    
or the terms of the GNU General Public License of the Free Software Foundation.
    
Over time both software evolved following different paths, and the accounting
results they give may differ depending on the printer driver being used.
We know that pkpgcounter's PCL3/4/5 parser sometimes is not accurate,
and we are working on improving the situation. We currently don't know how 
PCLCount would behave with the same input files.

pkpgcounter's PCLXL (aka PCL6) parser doesn't originate from PCLCount, but 
was written from scratch. 

=============================================================================

Please e-mail bugs to : alet@librelogiciel.com (Jerome Alet)
