Index: /pkpgcounter/trunk/pkpgpdls/pcl345.py
===================================================================
--- /pkpgcounter/trunk/pkpgpdls/pcl345.py (revision 443)
+++ /pkpgcounter/trunk/pkpgpdls/pcl345.py (revision 452)
@@ -33,4 +33,5 @@
 
 NUL = chr(0x00)
+LINEFEED = chr(0x0a)
 FORMFEED = chr(0x0c)
 ESCAPE = chr(0x1b)
@@ -105,5 +106,12 @@
     def setPageDict(self, attribute, value) :
         """Initializes a page dictionnary."""
-        dic = self.pages.setdefault(self.pagecount, { "copies" : 1, "mediasource" : "Main", "mediasize" : "Default", "mediatype" : "Plain", "orientation" : "Portrait", "escaped" : "", "duplex": 0})
+        dic = self.pages.setdefault(self.pagecount, { "linescount" : 1,
+                                                      "copies" : 1, 
+                                                      "mediasource" : "Main", 
+                                                      "mediasize" : "Default", 
+                                                      "mediatype" : "Plain", 
+                                                      "orientation" : "Portrait", 
+                                                      "escaped" : "", 
+                                                      "duplex": 0 })
         dic[attribute] = value
         
@@ -226,4 +234,10 @@
                 self.setPageDict("copies", value)
                 #self.logdebug("COPIES %i" % value)
+            elif end == 'F' :    
+                self.linesperpagevalues.append(value)
+                self.linesperpage = value
+                #self.logdebug("LINES PER PAGE : %i" % self.linesperpage)
+            #else :
+            #    self.logdebug("Unexpected end <%s> and value <%s>" % (end, value))
                 
     def escAmpa(self) :    
@@ -293,4 +307,17 @@
                 #self.logdebug("SKIPTO %08x" % self.pos)
                 
+    def newLine(self) :            
+        """Handles new lines markers."""
+        if not self.hpgl2 :
+            dic = self.pages.get(self.pagecount, None)
+            if dic is None :
+                self.setPageDict("linescount", 1)                              
+                dic = self.pages.get(self.pagecount)
+            nblines = dic["linescount"]    
+            self.setPageDict("linescount", nblines + 1)                              
+            if (self.linesperpage is not None) \
+               and (dic["linescount"] > self.linesperpage) :
+                self.pagecount += 1
+        
     def getInteger(self) :    
         """Returns an integer value and the end character."""
@@ -360,4 +387,6 @@
         self.orientationsvalues = []
         self.mediatypesvalues = []
+        self.linesperpagevalues = []
+        self.linesperpage = None
         self.startgfx = []
         self.endgfx = []
@@ -368,4 +397,5 @@
         
         tags = [ lambda : None] * 256
+        tags[ord(LINEFEED)] = self.newLine
         tags[ord(FORMFEED)] = self.endPage
         tags[ord(ESCAPE)] = self.escape
@@ -442,4 +472,6 @@
         if self.isimagerunner :
             self.pagecount += 1      # ImageRunner adjustment
+        elif self.linesperpage is not None :    
+            self.pagecount += 1      # Adjusts for incomplete last page
         elif len(self.startgfx) == len(self.endgfx) == 0 :
             if self.resets % 2 :
Index: /pkpgcounter/trunk/pkpgpdls/version.py
===================================================================
--- /pkpgcounter/trunk/pkpgpdls/version.py (revision 450)
+++ /pkpgcounter/trunk/pkpgpdls/version.py (revision 452)
@@ -23,5 +23,5 @@
 
 
-__version__ = "2.15"
+__version__ = "2.16"
 
 __doc__ = """pkpgcounter : a generic Page Description Languages parser."""
Index: /pkpgcounter/trunk/man/pkpgcounter.1
===================================================================
--- /pkpgcounter/trunk/man/pkpgcounter.1 (revision 450)
+++ /pkpgcounter/trunk/man/pkpgcounter.1 (revision 452)
@@ -1,8 +1,8 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
-.TH PKPGCOUNTER "1" "February 2007" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
+.TH PKPGCOUNTER "1" "March 2007" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NAME
-pkpgcounter \- manual page for pkpgcounter 2.15
+pkpgcounter \- manual page for pkpgcounter 2.16
 .SH DESCRIPTION
-pkpgcounter v2.15 (c) 2003, 2004, 2005, 2006, 2007 Jerome Alet
+pkpgcounter v2.16 (c) 2003, 2004, 2005, 2006, 2007 Jerome Alet
 .PP
 pkpgcounter is a generic Page Description Language parser.
Index: /pkpgcounter/trunk/NEWS
===================================================================
--- /pkpgcounter/trunk/NEWS (revision 450)
+++ /pkpgcounter/trunk/NEWS (revision 452)
@@ -22,4 +22,10 @@
 pkpgcounter News :
 
+  * 2.16 : 
+  
+    - Fixed a problem in the PCL3/4/5 parser to accomodate line based
+      report generators which expect the printer to skip to next page
+      based on lines per page instead of sending a specific command.
+      
   * 2.15 :
    
