[LON-CAPA-cvs] cvs: loncom /interface printout.pl

foxr foxr@source.lon-capa.org
Tue, 26 Apr 2011 10:47:25 -0000


foxr		Tue Apr 26 10:47:25 2011 EDT

  Modified files:              
    /loncom/interface	printout.pl 
  Log:
  BZ 6307 - use gs instead of fixps...see if the output quality is any better.
  
  
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.147 loncom/interface/printout.pl:1.148
--- loncom/interface/printout.pl:1.147	Tue Feb  8 12:53:39 2011
+++ loncom/interface/printout.pl	Tue Apr 26 10:47:25 2011
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 # CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
 #
-# $Id: printout.pl,v 1.147 2011/02/08 12:53:39 droeschl Exp $
+# $Id: printout.pl,v 1.148 2011/04/26 10:47:25 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -477,11 +477,26 @@
 	      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>$tempo_file  2>/dev/null",
-                                 "for $status_statement now validating PS",
-                                 \%prog_state,$tempo_file);
+#----
+# The code below uses fixps to make pdf include in sequences work.
+#
+#              $comma = "fixps --force $new_name_file";
+#              &debug("FIXPS command: $comma");
+#              &busy_wait_command("$comma 1>$tempo_file  2>/dev/null",
+#                                 "for $status_statement now validating PS",
+#                                 \%prog_state,$tempo_file);
+
+#--- 
+#  The code below uses gs to make pdf includes in sequences work
+
+	      # Use gs to fix the postscript -> level 1.5 
+
+	      $comma = "gs -sDEVICE=pswrite -dLanguageLevel=1.5 ";
+	      &busy_wait_command("$comma -o $tempo_file $new_name_file 2>/dev/null 1>/dev/null",
+				 "for $status_statement now validating PS",
+				 \%prog_state, $tempo_file);
+
+#---
 	      &busy_wait_command("mv $tempo_file $new_name_file",
 				 'File move', \%prog_state, $new_name_file);
 	      if ($laystyle eq 'album' and $numberofcolumns eq '2') {