Changeset 410 for pkpgcounter/trunk

Show
Ignore:
Timestamp:
09/13/06 11:40:37 (18 years ago)
Author:
jerome
Message:

Integrated the SPL1 parser.

Location:
pkpgcounter/trunk/pkpgpdls
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pkpgcounter/trunk/pkpgpdls/analyzer.py

    r386 r410  
    3030 
    3131import version, pdlparser, postscript, pdf, pcl345, pclxl, \ 
    32        escp2, dvi, tiff, ooo, zjstream, qpdl 
     32       escp2, dvi, tiff, ooo, zjstream, qpdl, spl1 
    3333import inkcoverage 
    3434 
     
    172172                           pdf, \ 
    173173                           qpdl, \ 
     174                           spl1, \ 
    174175                           pcl345, \ 
    175176                           escp2, \ 
  • pkpgcounter/trunk/pkpgpdls/spl1.py

    r409 r410  
    3131import pdlparser 
    3232import pjl 
     33import version 
    3334 
    3435ESCAPECHARS = (chr(0x1b), chr(0x24)) 
     
    112113                    else :     
    113114                        if not self.isbitmap : 
    114                             raise pdlparser.PDLParserError, "Unfortunately this file format is incompletely recognized. Parsing aborted." 
     115                            raise pdlparser.PDLParserError, "Unfortunately SPL1 is incompletely recognized. Parsing aborted. Please report the problem to %s" % version.__authoremail__ 
    115116                        offset = unpack(self.unpackLong, minfile[pos:pos+4])[0] 
    116117                        sequencenum = unpack(self.unpackShort, minfile[pos+4:pos+6])[0] 
    117118                        codesop = " ".join([ "%02x" % ord(v) for v in minfile[pos+6:pos+12]]) 
    118119                        if codesop != "06 00 00 80 13 40" : 
    119                             raise pdlparser.PDLParserError, "Unfortunately this file format is incompletely recognized. Parsing aborted." 
    120                         self.logdebug("%08x   ==>   %04x   ==>   %s" % (pos, sequencenum, codesop))     
     120                            raise pdlparser.PDLParserError, "Unfortunately SPL1 is incompletely recognized. Parsing aborted. Please report the problem to %s" % version.__authoremail__ 
    121121                        if not sequencenum : 
    122122                            self.pagecount += 1