root / pkpgcounter / trunk / README @ 539

Revision 539, 6.5 kB (checked in by jerome, 16 years ago)

Added support for Structured Fax documents.

  • Property svn:keyword set to Auth Date Id Rev
  • Property svn:keywords set to Auth Date Id Rev
RevLine 
[185]1# $Id$
2
3pkpgcounter : a generic Page Description Language parser
4
[443]5(c) 2003, 2004, 2005, 2006, 2007 Jerome Alet <alet@librelogiciel.com>
[463]6This program is free software: you can redistribute it and/or modify
[185]7it under the terms of the GNU General Public License as published by
[463]8the Free Software Foundation, either version 3 of the License, or
[185]9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
[463]17along with this program.  If not, see <http://www.gnu.org/licenses/>.
[185]18
19=============================================================================
20
[375]21pkpgcounter is a generic Page Description Language parser which can either
22compute the number of pages in a document, or compute the percent of
23ink coverage needed to print each page, in different colorspaces.
[185]24
[375]25pkpgcounter currently recognizes the following document formats :
[185]26
27        - PostScript (both DSC compliant and binary)
28       
29        - PDF
30       
31        - PCL3/4/5
32       
33        - PCLXL (aka PCL6)
34       
[221]35        - DVI
36       
[528]37        - OpenDocument (ISO/IEC DIS 26300)
38       
[529]39        - Microsoft Word (c) (tm) (r) (etc...)
40       
[418]41        - Plain text
42       
[221]43        - TIFF
44       
[502]45        - Several other image formats
46       
[375]47        - ESC/P2
48       
[329]49        - Zenographics ZjStream
[229]50       
[386]51        - Samsung QPDL (aka SPL2)
52       
[418]53        - Samsung SPL1
54       
[473]55        - ESC/PageS03
56       
[480]57        - Brother HBP
58       
[485]59        - Hewlett-Packard Lightweight Imaging Device Interface Language
60       
[539]61        - Structured Fax
62       
63The eight latter ones, as well as some TIFF documents, are currently
[375]64only supported in page counting mode.
[185]65
[368]66By default, when launched pkpgcounter prints on its standard output
67a single integer representing the total number of pages in all the
68files which filenames you've passed on the command line.
69
[185]70With no argument, or with a single dash in non-option arguments,
71pkpgcounter reads datas to parse from its standard input in addition
72to other non-options arguments which are treated as filenames
73representing the files to parse.
74
[375]75See pkpgcounter --help for details and examples.
[185]76
77=============================================================================
78
79Installation :
80--------------
81
82  0 - Download pkpgcounter from :
83 
[336]84        http://www.pykota.com/software/pkpgcounter/download
[185]85       
86      and extract it : 
87     
88        $ tar -zxf pkpgcounter-x.yy.tar.gz
89       
90        where x.yy is pkpgcounter' version number.
91       
[204]92  1 - Run the installation script :
[185]93     
[204]94        $ python setup.py install
[185]95       
[204]96      This will usually install the pkpgcounter into /usr/bin and 
[235]97      the library into /usr/lib/python2.?/site-packages/pkpgpdls/
[204]98       
[185]99  2 - Use pkpgcounter :
100 
101      $ pkpgcounter file1.ps file2.pclxl ... <fileN.escp2
102     
103      pkpgcounter will display the total size in pages of all the files
104      passed on the command line.
105     
[374]106      $ pkpgcounter --colorspace bw --resolution 150 file1.ps
107 
108      Will output the percent of black ink needed on each page of
109      the file1.ps file rendered at 150 dpi.
110     
[185]111  3 - That's all !   
112 
[527]113DEPENDENCIES :
114
[528]115  Most of the time, pkpgcounter only depends on the presence of :
116 
117  - The Python Imaging Library (python-imaging)
118 
119  But, depending on the file formats you plan to work with, and on the
120  accounting mode you want to use (pages vs ink), you may need to install
121  some or all of the additional software listed below. Usually, if one is
122  needed then pkpgcounter will complain. So your best bet is probably
123  to NOT INSTALL anything until pkpgcounter asks you to do so on its
124  standard error stream. Here's the list of software which may be needed
125  for some operations with pkpgcounter :
[527]126
127  - GhostScript (gs)
[374]128 
[527]129  - The X Virtual Frame Buffer (xvfb)
130 
131  - The X authority file utility xauth (xbase-clients)
132 
133  - The dvips converter from TeX DVI to PostScript (tetex-bin)
134 
135  - The ImageMagick image manipulation toolkit (imagemagick)
136 
137  - The AbiWord word processor (abiword)
[374]138
[527]139  - The GhostPCL/GhostPDL's pcl6 converter from PCL to PostScript
[374]140       
[185]141=============================================================================
142
143Troubleshooting :
144-----------------
145
146  If pkpgcounter gives incorrect results to you, please make an incorrectly
147  parsed data file available to us on some website, and tell us which
[528]148  driver was used, how many pages are in the file, and any additional
149  information you think is relevant.
[185]150 
[247]151  If pkpgcounter complain about your system lacking the Python Psyco module,
152  please consider installing it to speedup file parsing. However, don't forget
153  that Psyco currently only runs on the 32 bits x86 platform, so no need to
154  install it if you've got another system type.
155 
[185]156=============================================================================
157
[406]158Before pkpgcounter v1.86, the PCL3/4/5 parser was a Python backport of an early
[286]159release of the PCLCount software by Eduardo Gielamo Oliveira and Rodolfo Broco
[406]160Manin, available from :
[286]161
162    http://www.fea.unicamp.br/pclcount/
163   
164Their software is distributed under either the terms of a BSD-like license,   
165or the terms of the GNU General Public License of the Free Software Foundation.
166
[406]167Beginning with pkpgcounter v1.86, the PCL3/4/5 parser was rewritten from
168scratch, and is now much more readable, maintainable, and of course accurate.
169
[463]170The old parser was still available until pkpgcounter v2.18 was published, but
171was definitely removed after that, just before pkpgcounter v3.00 was published.
[406]172   
[286]173pkpgcounter's PCLXL (aka PCL6) parser doesn't originate from PCLCount, but
[406]174was written from scratch, just like all the other parsers included in
175pkpgcounter.
[286]176
177=============================================================================
178
[368]179pkpgcounter's ink coverage algorithm for the CMYK colorspace is a
180direct Python port from the PrintBill project by Daniel Franklin.
181PrintBill is distributed under the terms of the GNU General Public
[463]182License of the Free Software Foundation, version 2 or higher. The
[368]183algorithms used for the other colorspaces are a complete rewrite of
184PrintBill's algorithms using both Python and the Python Imaging
185Library's facilities.
186
187=============================================================================
188
[185]189Please e-mail bugs to : alet@librelogiciel.com (Jerome Alet)
Note: See TracBrowser for help on using the browser.