Diff for /loncom/interface/printout.pl between versions 1.37 and 1.39

version 1.37, 2003/09/01 03:30:57 version 1.39, 2003/10/20 17:39:30
Line 26 Line 26
 # http://www.lon-capa.org/  # http://www.lon-capa.org/
 #  #
   
   use lib '/home/httpd/lib/perl';
   use LONCAPA::loncgi();
   use File::Path;
 use IO::File;  use IO::File;
 use Image::Magick;  use Image::Magick;
   
   if (! &LONCAPA::loncgi::check_cookie_and_load_env()) {
       print <<END;
   Content-type: text/html
   
   <html>
   <head><title>Bad Cookie</title></head>
   <body>
   Your cookie information is incorrect.  What\'s up with that?
   </body>
   </html>
   END
       return;
   }
   
  print "Content-type: text/html\n\n";   print "Content-type: text/html\n\n";
  print "<body bgcolor=\"#FFFFFF\">\n";   print "<body bgcolor=\"#FFFFFF\">\n";
   my ($texfile,$laystyle,$numberofcolumns,$selectionmade) = split(/&/,$ENV{'QUERY_STRING'});  ####  my ($texfile,$laystyle,$numberofcolumns,$selectionmade) = split(/&/,$ENV{'QUERY_STRING'});
   
   my $identifier = $ENV{'QUERY_STRING'};
   my $texfile = $ENV{$identifier.'.file'};
   my $laystyle = $ENV{$identifier.'.layout'};
   my $numberofcolumns = $ENV{$identifier.'.numcol'};
   my $selectionmade = $ENV{$identifier.'.selection'};
   
   my $advans_role=0;    my $advans_role=0;
   if ($selectionmade>=10000) {$selectionmade=$selectionmade/10000; $advans_role=1;}    if ($selectionmade>=10000) {$selectionmade=$selectionmade/10000; $advans_role=1;}
   my $figfile = $texfile;    my $figfile = $texfile;
Line 48  use Image::Magick; Line 73  use Image::Magick;
       my $eps_f = $not_eps;        my $eps_f = $not_eps;
       $eps_f =~ s/\.[^.]*$/\.eps/i;        $eps_f =~ s/\.[^.]*$/\.eps/i;
       $_ = $eps_f;        $_ = $eps_f;
       m/\/([^\/]+)$/;        m/\/home\/httpd\/html\/res\/(.+)/;
       $eps_f = '/home/httpd/prtspool/'.$1;        $eps_f = '/home/httpd/prtspool/'.$1;
         my $path=$eps_f;
         $path=~s/\/([^\/]+)\.eps$//; 
         File::Path::mkpath($path,0,0777);
       my $image = Image::Magick->new;        my $image = Image::Magick->new;
       $not_eps =~ s/^\s+//;        $not_eps =~ s/^\s+//;
       $not_eps =~ s/\s+$//;        $not_eps =~ s/\s+$//;
Line 69  use Image::Magick; Line 97  use Image::Magick;
       }          }  
   }    }
       }        }
       unlink $figfile;  
   }    }
   #print "$texfile\n"; #name of the tex file for debugging only    #print "$texfile\n"; #name of the tex file for debugging only
   if (-e $texfile) {    if (-e $texfile) {

Removed from v.1.37  
changed lines
  Added in v.1.39


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>