Annotation of loncom/interface/printout.pl, revision 1.1
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/;
! 15: my $pro_fun = "dvips -o $new_name_file";
! 16: system("$pro_fun $name_file");
! 17: my $name_file = $new_name_file;
! 18: $name_file =~ s/\.ps/\.pdf/;
! 19: system("ps2pdf $new_name_file $name_file");
! 20:
! 21:
! 22: #print "<a href=\"http://bistromath.lite.msu.edu/$name_file\">Your PDF document</a>\n";
! 23: print "\n";
! 24:
! 25:
! 26:
! 27:
! 28: # my $ere;
! 29: # foreach $ere (%ENV) {
! 30: # print(' SS '.$ere.' => '.$ENV{$ere}.' FF '."\n\n");
! 31: # }
! 32:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>