Changeset 452 for pkpgcounter
- Timestamp:
- 03/15/07 19:48:25 (18 years ago)
- Location:
- pkpgcounter/trunk
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/man/pkpgcounter.1
r450 r452 1 1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. 2 .TH PKPGCOUNTER "1" " February2007" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"2 .TH PKPGCOUNTER "1" "March 2007" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NAME 4 pkpgcounter \- manual page for pkpgcounter 2.1 54 pkpgcounter \- manual page for pkpgcounter 2.16 5 5 .SH DESCRIPTION 6 pkpgcounter v2.1 5(c) 2003, 2004, 2005, 2006, 2007 Jerome Alet6 pkpgcounter v2.16 (c) 2003, 2004, 2005, 2006, 2007 Jerome Alet 7 7 .PP 8 8 pkpgcounter is a generic Page Description Language parser. -
pkpgcounter/trunk/NEWS
r450 r452 22 22 pkpgcounter News : 23 23 24 * 2.16 : 25 26 - Fixed a problem in the PCL3/4/5 parser to accomodate line based 27 report generators which expect the printer to skip to next page 28 based on lines per page instead of sending a specific command. 29 24 30 * 2.15 : 25 31 -
pkpgcounter/trunk/pkpgpdls/pcl345.py
r443 r452 33 33 34 34 NUL = chr(0x00) 35 LINEFEED = chr(0x0a) 35 36 FORMFEED = chr(0x0c) 36 37 ESCAPE = chr(0x1b) … … 105 106 def setPageDict(self, attribute, value) : 106 107 """Initializes a page dictionnary.""" 107 dic = self.pages.setdefault(self.pagecount, { "copies" : 1, "mediasource" : "Main", "mediasize" : "Default", "mediatype" : "Plain", "orientation" : "Portrait", "escaped" : "", "duplex": 0}) 108 dic = self.pages.setdefault(self.pagecount, { "linescount" : 1, 109 "copies" : 1, 110 "mediasource" : "Main", 111 "mediasize" : "Default", 112 "mediatype" : "Plain", 113 "orientation" : "Portrait", 114 "escaped" : "", 115 "duplex": 0 }) 108 116 dic[attribute] = value 109 117 … … 226 234 self.setPageDict("copies", value) 227 235 #self.logdebug("COPIES %i" % value) 236 elif end == 'F' : 237 self.linesperpagevalues.append(value) 238 self.linesperpage = value 239 #self.logdebug("LINES PER PAGE : %i" % self.linesperpage) 240 #else : 241 # self.logdebug("Unexpected end <%s> and value <%s>" % (end, value)) 228 242 229 243 def escAmpa(self) : … … 293 307 #self.logdebug("SKIPTO %08x" % self.pos) 294 308 309 def newLine(self) : 310 """Handles new lines markers.""" 311 if not self.hpgl2 : 312 dic = self.pages.get(self.pagecount, None) 313 if dic is None : 314 self.setPageDict("linescount", 1) 315 dic = self.pages.get(self.pagecount) 316 nblines = dic["linescount"] 317 self.setPageDict("linescount", nblines + 1) 318 if (self.linesperpage is not None) \ 319 and (dic["linescount"] > self.linesperpage) : 320 self.pagecount += 1 321 295 322 def getInteger(self) : 296 323 """Returns an integer value and the end character.""" … … 360 387 self.orientationsvalues = [] 361 388 self.mediatypesvalues = [] 389 self.linesperpagevalues = [] 390 self.linesperpage = None 362 391 self.startgfx = [] 363 392 self.endgfx = [] … … 368 397 369 398 tags = [ lambda : None] * 256 399 tags[ord(LINEFEED)] = self.newLine 370 400 tags[ord(FORMFEED)] = self.endPage 371 401 tags[ord(ESCAPE)] = self.escape … … 442 472 if self.isimagerunner : 443 473 self.pagecount += 1 # ImageRunner adjustment 474 elif self.linesperpage is not None : 475 self.pagecount += 1 # Adjusts for incomplete last page 444 476 elif len(self.startgfx) == len(self.endgfx) == 0 : 445 477 if self.resets % 2 : -
pkpgcounter/trunk/pkpgpdls/version.py
r450 r452 23 23 24 24 25 __version__ = "2.1 5"25 __version__ = "2.16" 26 26 27 27 __doc__ = """pkpgcounter : a generic Page Description Languages parser."""