Changeset 216
- Timestamp:
- 06/30/05 14:31:35 (19 years ago)
- Location:
- pkpgcounter/trunk
- Files:
-
- 1 added
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/NEWS
r211 r216 22 22 pkpgcounter News : 23 23 24 * 1.51 : 25 26 - Basic support for the DVI format. 27 24 28 * 1.50 : 25 29 -
pkpgcounter/trunk/pdlanalyzer/analyzer.py
r211 r216 23 23 import tempfile 24 24 25 from pdlanalyzer import version, pdlparser, postscript, pdf, pcl345, pclxl, escp2 25 from pdlanalyzer import version, pdlparser, postscript, pdf, pcl345, pclxl, escp2, dvi 26 26 27 27 KILOBYTE = 1024 … … 57 57 psyco.bind(pcl345.PCL345Parser.getJobSize) 58 58 psyco.bind(pclxl.PCLXLParser.getJobSize) 59 psyco.bind(dvi.DVIParser.getJobSize) 59 60 60 61 def getJobSize(self) : … … 172 173 if self.debug : 173 174 sys.stderr.write("%s is an ESC/P2 file\n" % str(self.filename)) 175 return 1 176 else : 177 return 0 178 179 def isDVI(self, sdata, edata) : 180 """Returns 1 if data is DVI, else 0.""" 181 if (ord(sdata[0]) == 0xf7) and (ord(edata[-1]) == 0xdf) : 182 if self.debug : 183 sys.stderr.write("%s is an DVI file\n" % str(self.filename)) 174 184 return 1 175 185 else : … … 200 210 elif self.isESCP2(firstblock, lastblock) : 201 211 return escp2.ESCP2Parser 212 elif self.isDVI(firstblock, lastblock) : 213 return dvi.DVIParser 202 214 else : 203 215 raise pdlparser.PDLParserError, "Analysis of first data block failed." -
pkpgcounter/trunk/pdlanalyzer/version.py
r211 r216 20 20 # 21 21 22 __version__ = "1.5 0"22 __version__ = "1.51" 23 23 24 24 __doc__ = """pkpgcounter : a generic Page Description Languages parser."""