Changeset 398 for pkpgcounter/trunk/pkpgpdls/newpcl345.py
- Timestamp:
- 09/08/06 14:40:20 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/newpcl345.py
r397 r398 109 109 """Reads a byte from the input stream.""" 110 110 tag = ord(self.minfile[self.pos]) 111 if tag == 0x0c :112 self.logdebug("%08x ====> %02x %02x %02x %02x" %113 (self.pos,114 ord(self.minfile[self.pos-2]),115 ord(self.minfile[self.pos-1]),116 ord(self.minfile[self.pos-0]),117 ord(self.minfile[self.pos+1])))118 111 self.pos += 1 119 112 return tag … … 121 114 def endPage(self) : 122 115 """Handle the FF marker.""" 123 self.logdebug("FORMFEED %i at %08x" % (self.pagecount, self.pos-1))116 #self.logdebug("FORMFEED %i at %08x" % (self.pagecount, self.pos-1)) 124 117 self.pagecount += 1 125 118 … … 157 150 def enterHPGL2(self) : 158 151 """Enters HPGL2 mode.""" 159 self.logdebug("ENTERHPGL2 %08x" % self.pos)152 #self.logdebug("ENTERHPGL2 %08x" % self.pos) 160 153 self.hpgl2 = True 161 154 162 155 def exitHPGL2(self) : 163 156 """Exits HPGL2 mode.""" 164 self.logdebug("EXITHPGL2 %08x" % self.pos)157 #self.logdebug("EXITHPGL2 %08x" % self.pos) 165 158 self.hpgl2 = False 166 159 … … 468 461 self.logdebug("MediaSourcesNOTDefault : \t%i" % (len(self.mediasourcesvalues) - nbmediasourcesdefault)) 469 462 self.logdebug("Orientations : \t\t\t%s" % self.orientationsvalues) 470 self.logdebug("NbOrientations : \t\t\t%i" % len(self.orientationsvalues)) 463 nborientations = len(self.orientationsvalues) 464 self.logdebug("NbOrientations : \t\t\t%i" % nborientations) 471 465 self.logdebug("StartGfx : \t\t\t%s" % len(self.startgfx)) 472 466 self.logdebug("EndGfx : \t\t\t%s" % len(self.endgfx)) … … 474 468 self.logdebug("NbBackSides : \t\t\t%i" % len(self.backsides)) 475 469 470 if len(self.startgfx) == len(self.endgfx) == 0 : 471 if self.resets % 2 : 472 if nborientations == self.pagecount + 1 : 473 self.logdebug("Adjusting PageCount : +1") 474 self.pagecount += 1 475 elif nborientations == self.pagecount - 1 : 476 self.logdebug("Adjusting PageCount : -1") 477 self.pagecount -= 1 476 478 return self.pagecount or nbmediasourcesdefault 477 479