Changeset 265

Show
Ignore:
Timestamp:
09/19/05 13:18:44 (19 years ago)
Author:
jerome
Message:

Improved PCL3/4/5 parser

Files:
1 modified

Legend:

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

    r262 r265  
    309309            sys.stderr.write("escstart : %s\n" % escstart) 
    310310         
    311         if pagecount and (pagecount == orientationcount) : 
     311        if (orientationcount == (pagecount - 1)) and (resets == 1) : 
     312            pagecount -= 1 
     313        elif pagecount and (pagecount == orientationcount) : 
    312314            pass 
    313315        elif resets == ejects == mediasourcecount == mediasizecount == escstart == 1 : 
    314316            if (startgfx and endgfx) and (startgfx != endgfx) : 
     317                pagecount = orientationcount 
     318            elif (endgfx and not startgfx) and (pagecount > orientationcount) :     
    315319                pagecount = orientationcount 
    316320            else :      
     
    329333            pass 
    330334        elif (resets == 1) and (startgfx == endgfx) and (mediasourcecount == 0) : 
    331             pass 
     335            if (startgfx > 1) and (startgfx != (pagecount - 1)) : 
     336                pagecount -= 1 
     337            else :     
     338                pass 
    332339        elif startgfx == endgfx :     
    333340            pagecount = startgfx