311 | | # if not pagecount : |
312 | | # pagecount = (pagecount or ((resets - 3) * (resets > 2))) |
313 | | # else : |
314 | | # # here we add counters for other ways new pages may have |
315 | | # # been printed and ejected by the printer |
316 | | # pagecount += ejects + backsides |
317 | | # |
318 | | # # now handle number of copies for each page (may differ). |
319 | | # # in duplex mode, number of copies may be sent only once. |
320 | | # for pnum in range(pagecount) : |
321 | | # # if no number of copies defined, take the preceding one else the one set before any page else 1. |
322 | | # page = pages.get(pnum, pages.get(pnum - 1, pages.get(0, { "copies" : 1 }))) |
323 | | # pagecount += (page["copies"] - 1) |
324 | | # |
325 | | # # in PCL3 files, there's one Start Gfx tag per page |
326 | | # if ispcl3 : |
327 | | # if endgfx == int(startgfx / 2) : # special case for cdj1600 |
328 | | # pagecount = endgfx |
329 | | # elif startgfx : |
330 | | # pagecount = startgfx |
331 | | # elif endgfx : |
332 | | # pagecount = endgfx |
333 | | |
334 | | |