Changeset 444 for pkpgcounter/trunk
- Timestamp:
- 01/22/07 23:09:19 (18 years ago)
- Location:
- pkpgcounter/trunk
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/NEWS
r443 r444 22 22 pkpgcounter News : 23 23 24 * 2.14 : 25 26 - Fixed a problem with some PS drivers which don't output %%Page: 27 comments. 28 24 29 * 2.13 : 25 30 -
pkpgcounter/trunk/pkpgpdls/postscript.py
r443 r444 90 90 prescribe = 0 # Kyocera's Prescribe commands 91 91 acrobatmarker = 0 92 pagescomment = None 92 93 for line in self.infile.xreadlines() : 93 94 if (not prescribe) and line.startswith(r"%%BeginResource: procset pdf") \ … … 98 99 elif line.startswith("!R!") : 99 100 prescribe = 1 101 elif line.startswith(r"%%Pages: ") : 102 try : 103 pagescomment = int(line.split()[1]) 104 except ValueError : 105 pass # strange, to say the least 100 106 elif line.startswith(r"%%Page: ") or line.startswith(r"(%%[Page: ") : 101 107 proceed = 1 … … 177 183 pagecount += (copies - 1) 178 184 self.logdebug("%s * page #%s" % (copies, pnum)) 185 186 if not pagecount and pagescomment : 187 pagecount = pagescomment 179 188 self.logdebug("Internal parser said : %s pages" % pagecount) 180 189 return (pagecount, notrust) … … 185 194 (nbpages, notrust) = self.natively() 186 195 newnbpages = nbpages 187 if notrust :196 if notrust or not nbpages : 188 197 try : 189 198 newnbpages = self.throughGhostScript() -
pkpgcounter/trunk/pkpgpdls/version.py
r443 r444 23 23 24 24 25 __version__ = "2.14 alpha"25 __version__ = "2.14" 26 26 27 27 __doc__ = """pkpgcounter : a generic Page Description Languages parser."""