[LON-CAPA-cvs] cvs: loncom /interface printout.pl
raeburn
raeburn@source.lon-capa.org
Sun, 27 Sep 2009 02:47:11 -0000
raeburn Sun Sep 27 02:47:11 2009 EDT
Modified files:
/loncom/interface printout.pl
Log:
- Bug 6029.
- Run fixps to sanitize postscript on both 1 col and 2 col output,
before running psnup or pstops.
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.143 loncom/interface/printout.pl:1.144
--- loncom/interface/printout.pl:1.143 Fri Jul 3 16:13:13 2009
+++ loncom/interface/printout.pl Sun Sep 27 02:47:11 2009
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
#
-# $Id: printout.pl,v 1.143 2009/07/03 16:13:13 bisitz Exp $
+# $Id: printout.pl,v 1.144 2009/09/27 02:47:11 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -477,17 +477,21 @@
my $ps_file = my $tempo_file = $1.'temporar.ps';
my $pdf_file = $1.'.pdf';
$papera=~s/t/p/;
+ $comma = "fixps --force $new_name_file";
+ &debug("FIXPS command: $comma");
+ &busy_wait_command("$comma 1>/dev/null 2>/dev/null",
+ "for $status_statement now validating PS",
+ \%prog_state,$tempo_file);
if ($laystyle eq 'album' and $numberofcolumns eq '2') {
- $comma = "fixps --force ".$new_name_file." | psnup $papera -2 -s1.0 ";
+ $comma = "psnup $papera -2 -s1.0 $new_name_file";
&debug("PSNUP command: $comma");
- &busy_wait_command("$comma 1>$tempo_file 2>/dev/null",
+ &busy_wait_command("$comma $tempo_file 1>/dev/null 2>/dev/null",
"for $status_statement now Modifying PS layout",
\%prog_state,$tempo_file);
} elsif ($laystyle eq 'book' and $numberofcolumns eq '2') {
- $comma = 'fixps --force '.$new_name_file.' | pstops '.$papera.' "2:0+1(0.48w,0)"';
+ $comma = 'pstops '.$papera.' "2:0+1(0.48w,0)" '.$new_name_file;
&debug("PSTOPS command: $comma ");
-
- &busy_wait_command("$comma 1>$tempo_file 2>/dev/null",
+ &busy_wait_command("$comma $tempo_file 1>/dev/null 2>/dev/null",
"for $status_statement now Modifying PS layout",
\%prog_state,$tempo_file);
} else {