Index: /pykota/trunk/conf/pykota.conf.sample
===================================================================
--- /pykota/trunk/conf/pykota.conf.sample (revision 2146)
+++ /pykota/trunk/conf/pykota.conf.sample (revision 2193)
@@ -721,8 +721,20 @@
 # NB : pkbanner's default page size is A4
 #
+# A static banner page
 # endingbanner: /home/joe/mystaticbanner.ps
+#
+# A banner with personnalized logo and url
 # endingbanner: /usr/bin/pkbanner --pagesize=A4 --logo="/home/joe/mylogo.jpeg" --url="http://tech.example.com"
+#
+# A banner in the format accepted by the printer
 # endingbanner: /usr/bin/pkbanner | gs -q -dNOPAUSE -dBATCH -dPARANOIDSAFER -sOutputFile=- -sDEVICE=lj5mono -
-# endingbanner: /usr/bin/pkbanner
+#
+# A banner with more info on it, extracted from the yellow pages.
+# the string "Phone 111222333444" will be added to the banner page
+# if extractphone.sh returns 111222333444 for the current user.
+# endingbanner: /usr/bin/pkbanner Phone `extractphone.sh $PYKOTAUSERNAME`
+#
+# Default PyKota banner
+# endingbanner: /usr/bin/pkbanner 
 
 # How should enforcement be done for this printer ?
Index: /pykota/trunk/bin/pkbanner
===================================================================
--- /pykota/trunk/bin/pkbanner (revision 2147)
+++ /pykota/trunk/bin/pkbanner (revision 2193)
@@ -55,5 +55,5 @@
 command line usage :
 
-  pkbanner  [options] 
+  pkbanner  [options]  [more info]
 
 options :
@@ -144,7 +144,6 @@
         return (size + 4)
     
-    def genPDF(self, pagesize, logo, url, savetoner) :
+    def genPDF(self, pagesize, logo, url, text, savetoner) :
         """Generates the banner in PDF format, return the PDF document as a string."""
-        
         document = cStringIO.StringIO()
         c = canvas.Canvas(document, pagesize=pagesize, pageCompression=1)
@@ -183,4 +182,8 @@
         # Outputs the username
         ypos -= self.printVar(c, xcenter, ypos, _("Username"), username, 20, savetoner) 
+        
+        # Text    
+        if text :
+            ypos -= self.printVar(c, xcenter, ypos, _("More Info"), text, 20, savetoner) 
         
         # Printer and Job Id
@@ -239,5 +242,5 @@
         return document.getvalue()
         
-    def main(self, files, options) :
+    def main(self, arguments, options) :
         """Generates a banner."""
         if not hasRL :
@@ -261,14 +264,21 @@
             
         self.logdebug("Generating the banner in PDF format...")    
-        doc = self.genPDF(pagesize, options["logo"].strip(), options["url"].strip(), savetoner)
+        doc = self.genPDF(pagesize, 
+                          options["logo"].strip(), 
+                          options["url"].strip(), 
+                          " ".join(arguments).strip(), 
+                          savetoner)
         
         self.logdebug("Converting the banner to PostScript...")    
         os.environ["PATH"] = "%s:/bin:/usr/bin:/usr/local/bin:/opt/bin:/sbin:/usr/sbin" % os.environ.get("PATH", "")
-        child = popen2.Popen3("gs -q -dNOPAUSE -dBATCH -dPARANOIDSAFER -sDEVICE=pswrite -sOutputFile=- - 2>/tmp/errgs")
-        child.tochild.write(doc)
-        child.tochild.close()
-        sys.stdout.write(child.fromchild.read())
-        sys.stdout.flush()
-        child.fromchild.close()
+        child = popen2.Popen3("gs -q -dNOPAUSE -dBATCH -dPARANOIDSAFER -sDEVICE=pswrite -sOutputFile=- -")
+        try :
+            child.tochild.write(doc)
+            child.tochild.close()
+            sys.stdout.write(child.fromchild.read())
+            sys.stdout.flush()
+            child.fromchild.close()
+        except IOError, msg :    
+            self.printInfo("I/O Error %s" % msg, "error")
         status = child.wait()
         if os.WIFEXITED(status) :
Index: /pykota/trunk/NEWS
===================================================================
--- /pykota/trunk/NEWS (revision 2188)
+++ /pykota/trunk/NEWS (revision 2193)
@@ -22,4 +22,9 @@
 PyKota NEWS :
        
+    - 1.22alpha4 :
+    
+        - Allows pkbanner to accept more info to display on its 
+          command line.
+          
     - 1.22alpha3 :
     
Index: /pykota/trunk/pykota/version.py
===================================================================
--- /pykota/trunk/pykota/version.py (revision 2179)
+++ /pykota/trunk/pykota/version.py (revision 2193)
@@ -22,5 +22,5 @@
 #
 
-__version__ = "1.22alpha3_unofficial"
+__version__ = "1.22alpha4_unofficial"
 
 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""
