Changeset 1622
- Timestamp:
- 07/22/04 15:49:51 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 8 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/conf/pykota.conf.sample
r1604 r1622 287 287 # pkpgcounter is a command line tool which is 288 288 # part of PyKota and which can handle both 289 # DSC compliant PostScript, PCL5, PCL6 (aka PCLXL)289 # DSC compliant or binary PostScript, PCL5, PCL6 (aka PCLXL) 290 290 # and PDF documents. More file formats will be added 291 291 # in the future, as time permits. -
pykota/trunk/FAQ
r1578 r1622 78 78 Page Description Language. 79 79 80 PyKota natively understands PostScript, PCL5, PCLXL (aka PCL6) 81 and PDF. More PDLs will be added in the future. However you can 82 always plug your own PDL analyzer in PyKota. 80 PyKota natively understands DSC compliant PostScript, PCL5, 81 PCLXL (aka PCL6) and PDF. Support for Binary PostScript is 82 done through GhostScript. More PDLs will be added in the future. 83 However you can always plug your own PDL analyzer in PyKota. 83 84 84 85 * I've got a great number of users. How can I automatically -
pykota/trunk/LICENSE
r1257 r1622 29 29 Then follow the instructions in the section labeled "Getting a Copy of the CVS Repository". 30 30 31 * Clients who purchased an **Official PyKota Package** can directly access to "the tarballs HERE":/software/PyKota/tarballs . 31 * Clients who purchased an **Official PyKota Package** can directly access to "the tarballs HERE": 32 http://www.librelogiciel.com/software/PyKota/tarballs . 32 33 33 34 Why no tarball is available for free : … … 63 64 * Electronic form : 64 65 65 * You pay me any amount of money starting at ** 15$ (US Dollars)**66 * You pay me any amount of money starting at **20$ (US Dollars)** 66 67 67 68 * Then I send you the latest **PyKota 'OFFICIAL'** tarball, -
pykota/trunk/man/pkpgcounter.1
r1575 r1622 14 14 \fBpkpgcounter\fP is a convenience script provided by pykota that attempts 15 15 to count the number of pages in a DSC compliant PostScript, PDF, PCL5 or 16 PCL6 (aka PCLXL) document. This may be of use 17 as an external accounter as defined in /etc/pykota/pykota.conf, since currently 18 \fBpkpgcounter\fP is the smarter software accounter included with PyKota. 16 PCL6 (aka PCLXL) document. Binary PostScript is also supported through 17 GhostScript. This may be of use as an external accounter as defined in 18 /etc/pykota/pykota.conf, since currently \fBpkpgcounter\fP is the smarter 19 software accounter included with PyKota. 19 20 20 21 \fBpkpgcounter\fP with no argument reads the job's data from stdin, and prints -
pykota/trunk/NEWS
r1611 r1622 22 22 PyKota NEWS : 23 23 24 - 1.19alpha35 : 25 26 - Generic PDL analyzer now supports Binary PostScript documents 27 in addition to DSC compliant ones. 28 24 29 - 1.19alpha34 : 25 30 -
pykota/trunk/pykota/pdlanalyzer.py
r1599 r1622 22 22 # 23 23 # $Log$ 24 # Revision 1.26 2004/07/22 13:49:51 jalet 25 # Added support for binary PostScript through GhostScript if native DSC 26 # compliant PostScript analyzer doesn't find any page. This is much 27 # slower though, so native analyzer is tried first. 28 # 24 29 # Revision 1.25 2004/07/10 14:06:36 jalet 25 30 # Fix for Python2.1 incompatibilities … … 108 113 import tempfile 109 114 import mmap 115 import popen2 110 116 111 117 KILOBYTE = 1024 … … 125 131 """Initialize PostScript Analyzer.""" 126 132 self.infile = infile 127 128 def getJobSize(self) : 133 134 def throughGhostScript(self) : 135 """Get the count through GhostScript, useful for non-DSC compliant PS files.""" 136 self.infile.seek(0) 137 command = 'gs -sDEVICE=bbox -dNOPAUSE -dBATCH -dQUIET - 2>&1 | grep -c "%%HiResBoundingBox:" 2>/dev/null' 138 child = popen2.Popen4(command) 139 try : 140 data = self.infile.read(MEGABYTE) 141 while data : 142 child.tochild.write(data) 143 data = self.infile.read(MEGABYTE) 144 child.tochild.flush() 145 child.tochild.close() 146 except (IOError, OSError), msg : 147 raise PDLAnalyzerError, "Problem during analysis of Binary PostScript document." 148 149 pagecount = 0 150 try : 151 pagecount = int(child.fromchild.readline().strip()) 152 except (IOError, OSError, AttributeError, ValueError) : 153 raise PDLAnalyzerError, "Problem during analysis of Binary PostScript document." 154 child.fromchild.close() 155 156 try : 157 retcode = child.wait() 158 except OSError, msg : 159 raise PDLAnalyzerError, "Problem during analysis of Binary PostScript document." 160 return pagecount 161 162 def natively(self) : 129 163 """Count pages in a DSC compliant PostScript document.""" 164 self.infile.seek(0) 130 165 pagecount = 0 131 166 for line in self.infile.xreadlines() : … … 133 168 pagecount += 1 134 169 return pagecount 170 171 def getJobSize(self) : 172 """Count pages in PostScript document.""" 173 return self.natively() or self.throughGhostScript() 135 174 136 175 class PDFAnalyzer : -
pykota/trunk/pykota/version.py
r1611 r1622 22 22 # 23 23 24 __version__ = "1.19alpha3 4_unofficial"24 __version__ = "1.19alpha35_unofficial" 25 25 26 26 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng.""" -
pykota/trunk/README
r1612 r1622 69 69 This is completely configurable. 70 70 71 - Supports DSC compliant PostScript, PDF, PCL5, and72 PCLXL (aka PCL6) printers natively for software71 - Supports DSC compliant and binary PostScript, PDF, PCL5, 72 and PCLXL (aka PCL6) printers natively for software 73 73 accounting methods. More formats to come. 74 74