Changeset 543 for pkpgcounter/trunk/pkpgpdls
- Timestamp:
- 12/09/07 11:25:35 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/pcl345.py
r541 r543 470 470 self.logdebug("MediaSources : \t\t\t%s" % self.mediasourcesvalues) 471 471 nbmediasourcesdefault = len([m for m in self.mediasourcesvalues if m == 'Default']) 472 nbmediasourcesnotdefault = len(self.mediasourcesvalues) - nbmediasourcesdefault 472 473 self.logdebug("MediaSourcesDefault : \t\t%i" % nbmediasourcesdefault) 473 self.logdebug("MediaSourcesNOTDefault : \t%i" % (len(self.mediasourcesvalues) - nbmediasourcesdefault))474 self.logdebug("MediaSourcesNOTDefault : \t%i" % nbmediasourcesnotdefault) 474 475 self.logdebug("Orientations : \t\t\t%s" % self.orientationsvalues) 475 476 nborientations = len(self.orientationsvalues) … … 482 483 483 484 if self.isimagerunner : 485 self.logdebug("Adjusting PageCount : +1") 484 486 self.pagecount += 1 # ImageRunner adjustment 485 487 elif self.linesperpage is not None : 488 self.logdebug("Adjusting PageCount : +1") 486 489 self.pagecount += 1 # Adjusts for incomplete last page 487 490 elif len(self.startgfx) == len(self.endgfx) == 0 : … … 490 493 self.logdebug("Adjusting PageCount : +1") 491 494 self.pagecount += 1 492 elif nborientations == self.pagecount - 1 : 495 elif (self.pagecount > 1) \ 496 and (nborientations == self.pagecount - 1) : 493 497 self.logdebug("Adjusting PageCount : -1") 494 498 self.pagecount -= 1 499 elif (self.pagecount > 1) \ 500 and (self.resets == 2) \ 501 and (not nbmediasourcesdefault) \ 502 and (nbmediasourcesnotdefault == 1) : 503 self.logdebug("Adjusting PageCount : -1") 504 self.pagecount -= 1 495 505 496 506 self.pagecount = self.pagecount or nbmediasourcesdefault