573 | | if not pagecount : |
574 | | pagecount = (pagecount or ((resets - 3) * (resets > 2))) |
575 | | else : |
576 | | # here we add counters for other ways new pages may have |
577 | | # been printed and ejected by the printer |
578 | | pagecount += ejects + backsides |
579 | | |
580 | | # now handle number of copies for each page (may differ). |
581 | | # in duplex mode, number of copies may be sent only once. |
582 | | for pnum in range(pagecount) : |
583 | | # if no number of copies defined, take the preceding one else the one set before any page else 1. |
584 | | page = pages.get(pnum, pages.get(pnum - 1, pages.get(0, { "copies" : 1 }))) |
585 | | pagecount += (page["copies"] - 1) |
586 | | |
587 | | # in PCL3 files, there's one Start Gfx tag per page |
588 | | if ispcl3 : |
589 | | if endgfx == int(startgfx / 2) : # special case for cdj1600 |
590 | | pagecount = endgfx |
591 | | elif startgfx : |
592 | | pagecount = startgfx |
593 | | elif endgfx : |
594 | | pagecount = endgfx |
| 577 | # if not pagecount : |
| 578 | # pagecount = (pagecount or ((resets - 3) * (resets > 2))) |
| 579 | # else : |
| 580 | # # here we add counters for other ways new pages may have |
| 581 | # # been printed and ejected by the printer |
| 582 | # pagecount += ejects + backsides |
| 583 | # |
| 584 | # # now handle number of copies for each page (may differ). |
| 585 | # # in duplex mode, number of copies may be sent only once. |
| 586 | # for pnum in range(pagecount) : |
| 587 | # # if no number of copies defined, take the preceding one else the one set before any page else 1. |
| 588 | # page = pages.get(pnum, pages.get(pnum - 1, pages.get(0, { "copies" : 1 }))) |
| 589 | # pagecount += (page["copies"] - 1) |
| 590 | # |
| 591 | # # in PCL3 files, there's one Start Gfx tag per page |
| 592 | # if ispcl3 : |
| 593 | # if endgfx == int(startgfx / 2) : # special case for cdj1600 |
| 594 | # pagecount = endgfx |
| 595 | # elif startgfx : |
| 596 | # pagecount = startgfx |
| 597 | # elif endgfx : |
| 598 | # pagecount = endgfx |