Changeset 312
- Timestamp:
- 02/07/06 19:46:44 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/pclxl.py
r311 r312 323 323 raise pdlparser.PDLParserError, "Error on size at %x" % self.pos 324 324 else : 325 pos = pos -1325 pos -= 1 326 326 return 0 327 327 … … 347 347 return endpos - pos 348 348 349 def skipKyoceraPrescribe(self) : 350 """Skips Kyocera Prescribe commands.""" 351 minfile = self.minfile 352 pos = self.pos - 1 353 if minfile[pos:pos+3] == "!R!" : 354 while (pos - self.pos) < 1024 : # This is a realistic upper bound, to avoid infinite loops 355 if (minfile[pos] == ";") and (minfile[pos-4:pos] == "EXIT") : 356 return (pos + 1 - self.pos) 357 pos += 1 358 else : 359 return 0 360 349 361 def getJobSize(self) : 350 362 """Counts pages in a PCLXL (PCL6) document. … … 394 406 395 407 self.tags[0x1b] = self.escape # The escape code 408 409 self.tags[0x21]= self.skipKyoceraPrescribe 396 410 397 411 # GhostScript's sources tell us that HP printers