Changeset 323 for pkpgcounter/trunk/pkpgpdls/postscript.py
- Timestamp:
- 02/15/06 20:21:48 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/postscript.py
r321 r323 86 86 notrust = 0 87 87 prescribe = 0 # Kyocera's Prescribe commands 88 88 acrobatmarker = 0 89 89 for line in self.infile.xreadlines() : 90 90 if (not prescribe) and line.startswith(r"%%BeginResource: procset pdf") \ 91 91 and not acrobatmarker : 92 92 notrust = 1 # Let this stuff be managed by GhostScript, but we still extract number of copies 93 94 93 elif line.startswith(r"%ADOPrintSettings: L3") : 94 acrobatmarker = 1 95 95 elif line.startswith("!R!") : 96 96 prescribe = 1 … … 100 100 newpagenum = int(line.split(']')[0].split()[1]) 101 101 except : 102 pass 103 else : 102 notinteger = 1 # It seems that sometimes it's not an integer but an EPS file name 103 else : 104 notinteger = 0 104 105 if newpagenum == oldpagenum : 105 106 proceed = 0 106 107 else : 107 108 oldpagenum = newpagenum 108 if proceed :109 if proceed and not notinteger : 109 110 pagecount += 1 110 111 self.pages[pagecount] = { "copies" : self.pages[pagecount-1]["copies"] }