explicitly tell dvips to write output to a file
[freeside.git] / FS / FS / cust_bill.pm
index 9409bc5..8687711 100644 (file)
@@ -343,6 +343,10 @@ sub send {
 
   }
 
+  if ( $conf->config('invoice_latex') ) {
+    @print_text = $self->print_ps('', $template);
+  }
+
   if ( grep { $_ eq 'POST' } @invoicing_list ) { #postal
     my $lpr = $conf->config('lpr');
     open(LPR, "|$lpr")
@@ -1067,7 +1071,7 @@ sub print_ps {
   system('pslatex', "$file.tex");
   system('pslatex', "$file.tex");
   #system('dvips', '-t', 'letter', "$file.dvi", "$file.ps");
-  system('dvips', '-t', 'letter', "$file.dvi" );
+  system('dvips', '-t', 'letter', "$file.dvi", '-o', "$file.ps" );
 
   open(POSTSCRIPT, "<$file.ps") or die "can't open $file.ps (probable error in LaTeX template): $!\n";