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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 03 Feb 2005 21:37:48 -0000


albertel		Thu Feb  3 16:37:48 2005 EDT

  Modified files:              
    /loncom/interface	printout.pl 
  Log:
  - BUG#3888, the a 64bit machine was excberating some kind of issue in Image::Magick workign around it
  
  
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.71 loncom/interface/printout.pl:1.72
--- loncom/interface/printout.pl:1.71	Mon Dec 20 16:15:20 2004
+++ loncom/interface/printout.pl	Thu Feb  3 16:37:48 2005
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 # CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
 #
-# $Id: printout.pl,v 1.71 2004/12/20 21:15:20 albertel Exp $
+# $Id: printout.pl,v 1.72 2005/02/03 21:37:48 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -113,23 +113,17 @@
 	      my $path=$eps_f;
 	      $path=~s/\/([^\/]+)\.eps$//;
 	      File::Path::mkpath($path,0,0777);
-	      my $image = Image::Magick->new;
 	      $not_eps =~ s/^\s+//;
 	      $not_eps =~ s/\s+$//;
-	      if ( exists($done_conversion{$not_eps})) {
-		  next;
-	      }
+	      if ( exists($done_conversion{$not_eps})) { next; }
 	      if ($adv) {
 		  my $prettyname=$not_eps;
 		  $prettyname=~s|/home/([^/]+)/public_html|/priv/$1|;
 		  $prettyname=~s|$Apache::lonnet::perlvar{'lonDocRoot'}/|/|;
-		  &Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state,'Converting to EPS '.$prettyname); }
+		  &Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state,'Converting to EPS '.$prettyname);
+	      }
 	      $done_conversion{$not_eps}=1;
-	      my $status = $image->Read($not_eps);
-	      if ($status) {print "  $status  ";}
-	      $image->Set(page => '+100+200'); 
-	      $status = $image->Write($eps_f);	    
-	      if ($status) {print "  $status  ";}
+	      system("convert $not_eps $eps_f");
               #check is eps exist in prtspool
               if(not -e $eps_f) {
 		  for (my $i=0;$i<10000;$i++) {