Annotation of loncom/interface/printout.pl, revision 1.2

1.1       sakharuk    1: #!/usr/bin/perl
                      2: print "Content-type: text/html\n\n";
                      3: print "<body bgcolor=\"#FFFFFF\">\n";
                      4: print "<h1>EXAMPLE</h1>\n";
                      5: my $texfile = $ENV{'QUERY_STRING'};
                      6:  $_ = $texfile;
                      7:  m/^(.*)\/([^\/]+)$/; 
                      8: my $name_file = $2;
                      9: my $path_file = $1.'/';
                     10:  chdir $path_file;
                     11:  system("latex $name_file 1>/dev/null 2>/dev/null");
                     12:  $name_file =~ s/\.tex/\.dvi/;
                     13: my $new_name_file = $name_file;
                     14:  $new_name_file =~ s/\.dvi/\.ps/;
1.2     ! sakharuk   15: my $comma = "dvips -o $new_name_file";
        !            16:  system("$comma $name_file");
        !            17:  $_ = $new_name_file;
        !            18:  m/^(.*)\./;
        !            19: my $tempo_file = $1.'temporar.ps';
        !            20: my $name_file = $1.'.pdf';
        !            21:  $comma = "psnup -2 -s1.0 $new_name_file";
        !            22:  system("$comma $tempo_file"); 
        !            23:  system("ps2pdf $tempo_file $name_file");
1.1       sakharuk   24: 
                     25: 
1.2     ! sakharuk   26: print "<a href=\"http://bistromath.lite.msu.edu/prtspool/$name_file\">Your PDF document</a>\n";
1.1       sakharuk   27: print "\n";
                     28: 
                     29: 
                     30: 
                     31: 
                     32: #    my $ere;
                     33: #    foreach $ere (%ENV) {
                     34: #	print(' SS '.$ere.' => '.$ENV{$ere}.' FF '."\n\n");
                     35: #    }
                     36:  

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