Changeset 452 for pkpgcounter/trunk

Show
Ignore:
Timestamp:
03/15/07 19:48:25 (17 years ago)
Author:
jerome
Message:

v2.16 is out with a fix for some line based PCL3/4/5 drivers.

Location:
pkpgcounter/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • pkpgcounter/trunk/man/pkpgcounter.1

    r450 r452  
    11.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36. 
    2 .TH PKPGCOUNTER "1" "February 2007" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
     2.TH PKPGCOUNTER "1" "March 2007" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
    33.SH NAME 
    4 pkpgcounter \- manual page for pkpgcounter 2.15 
     4pkpgcounter \- manual page for pkpgcounter 2.16 
    55.SH DESCRIPTION 
    6 pkpgcounter v2.15 (c) 2003, 2004, 2005, 2006, 2007 Jerome Alet 
     6pkpgcounter v2.16 (c) 2003, 2004, 2005, 2006, 2007 Jerome Alet 
    77.PP 
    88pkpgcounter is a generic Page Description Language parser. 
  • pkpgcounter/trunk/NEWS

    r450 r452  
    2222pkpgcounter News : 
    2323 
     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       
    2430  * 2.15 : 
    2531    
  • pkpgcounter/trunk/pkpgpdls/pcl345.py

    r443 r452  
    3333 
    3434NUL = chr(0x00) 
     35LINEFEED = chr(0x0a) 
    3536FORMFEED = chr(0x0c) 
    3637ESCAPE = chr(0x1b) 
     
    105106    def setPageDict(self, attribute, value) : 
    106107        """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 }) 
    108116        dic[attribute] = value 
    109117         
     
    226234                self.setPageDict("copies", value) 
    227235                #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)) 
    228242                 
    229243    def escAmpa(self) :     
     
    293307                #self.logdebug("SKIPTO %08x" % self.pos) 
    294308                 
     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         
    295322    def getInteger(self) :     
    296323        """Returns an integer value and the end character.""" 
     
    360387        self.orientationsvalues = [] 
    361388        self.mediatypesvalues = [] 
     389        self.linesperpagevalues = [] 
     390        self.linesperpage = None 
    362391        self.startgfx = [] 
    363392        self.endgfx = [] 
     
    368397         
    369398        tags = [ lambda : None] * 256 
     399        tags[ord(LINEFEED)] = self.newLine 
    370400        tags[ord(FORMFEED)] = self.endPage 
    371401        tags[ord(ESCAPE)] = self.escape 
     
    442472        if self.isimagerunner : 
    443473            self.pagecount += 1      # ImageRunner adjustment 
     474        elif self.linesperpage is not None :     
     475            self.pagecount += 1      # Adjusts for incomplete last page 
    444476        elif len(self.startgfx) == len(self.endgfx) == 0 : 
    445477            if self.resets % 2 : 
  • pkpgcounter/trunk/pkpgpdls/version.py

    r450 r452  
    2323 
    2424 
    25 __version__ = "2.15" 
     25__version__ = "2.16" 
    2626 
    2727__doc__ = """pkpgcounter : a generic Page Description Languages parser."""