[freeside-commits] freeside/FS/FS Conf.pm, 1.180.2.7, 1.180.2.8 cust_bill.pm, 1.163.2.3, 1.163.2.4

Ivan,,, ivan at wavetail.420.am
Tue Apr 24 18:35:36 PDT 2007


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv18471

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	Conf.pm cust_bill.pm 
Log Message:
add lpr-postscript_prefix and lpr-postscript_suffix config options for printer commands to place printer in postscript mode

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.180.2.7
retrieving revision 1.180.2.8
diff -u -d -r1.180.2.7 -r1.180.2.8
--- Conf.pm	24 Apr 2007 22:36:23 -0000	1.180.2.7
+++ Conf.pm	25 Apr 2007 01:35:33 -0000	1.180.2.8
@@ -758,6 +758,20 @@
   },
 
   {
+    'key'         => 'lpr-postscript_prefix',
+    'section'     => 'billing',
+    'description' => 'Raw printer commands prepended to the beginning of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
+    'type'        => 'text',
+  },
+
+  {
+    'key'         => 'lpr-postscript_suffix',
+    'section'     => 'billing',
+    'description' => 'Raw printer commands added to the end of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
+    'type'        => 'text',
+  },
+
+  {
     'key'         => 'money_char',
     'section'     => '',
     'description' => 'Currency symbol - defaults to `$\'',

Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.163.2.3
retrieving revision 1.163.2.4
diff -u -d -r1.163.2.3 -r1.163.2.4
--- cust_bill.pm	23 Apr 2007 03:42:40 -0000	1.163.2.3
+++ cust_bill.pm	25 Apr 2007 01:35:33 -0000	1.163.2.4
@@ -2090,10 +2090,21 @@
   unlink("$file.dvi", "$file.log", "$file.aux", "$file.ps", "$file.tex");
 
   my $ps = '';
+  
+  if ( $conf->exists('lpr-postscript_prefix') ) {
+    my $prefix = $conf->config('lpr-postscript_prefix');
+    $ps .= eval qq("$prefix");
+  }
+
   while (<POSTSCRIPT>) {
     $ps .= $_;
   }
 
+  if ( $conf->exists('lpr-postscript_suffix') ) {
+    my $suffix = $conf->config('lpr-postscript_suffix');
+    $ps .= eval qq("$suffix");
+  }
+
   close POSTSCRIPT;
 
   return $ps;



More information about the freeside-commits mailing list