Changeset 384 for pkpgcounter/trunk/pkpgpdls
- Timestamp:
- 09/04/06 11:14:02 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/postscript.py
r371 r384 168 168 self.logdebug("%s * page #%s" % (copies, pnum)) 169 169 self.logdebug("Internal parser said : %s pages" % pagecount) 170 171 if notrust : 172 pagecount = 0 # Let gs do counting 173 return pagecount 170 return (pagecount, notrust) 174 171 175 172 def getJobSize(self) : 176 173 """Count pages in PostScript document.""" 177 174 self.copies = 1 178 return self.natively() or self.throughGhostScript() 175 (nbpages, notrust) = self.natively() 176 newnbpages = nbpages 177 if notrust : 178 try : 179 newnbpages = self.throughGhostScript() 180 except pdlparser.PDLParserError, msg : 181 self.logdebug(msg) 182 return max(nbpages, newnbpages) 179 183 180 184 def test() :