version 1.50, 2004/02/18 22:23:19
|
version 1.57, 2004/05/12 18:34:47
|
Line 33 use File::Path;
|
Line 33 use File::Path;
|
use IO::File; |
use IO::File; |
use Image::Magick; |
use Image::Magick; |
use Apache::lonhtmlcommon; |
use Apache::lonhtmlcommon; |
|
use Apache::loncommon; |
|
use Apache::lonlocal; |
|
|
$|=1; |
$|=1; |
my %origENV=%ENV; |
my %origENV=%ENV; |
Line 49 Your cookie information is incorrect.
|
Line 51 Your cookie information is incorrect.
|
END |
END |
return; |
return; |
} |
} |
|
&Apache::lonlocal::get_language_handle(); |
print "Content-type: text/html\n\n"; |
&Apache::loncommon::content_type(undef,'text/html'); |
print "<body bgcolor=\"#FFFFFF\">\n"; |
my $bodytag=&Apache::loncommon::bodytag('Creating PDF','',''); |
|
print $bodytag; |
|
|
my $identifier = $ENV{'QUERY_STRING'}; |
my $identifier = $ENV{'QUERY_STRING'}; |
my $texfile = $ENV{'cgi.'.$identifier.'.file'}; |
my $texfile = $ENV{'cgi.'.$identifier.'.file'}; |
Line 86 END
|
Line 89 END
|
close $temporary_file; |
close $temporary_file; |
my $noteps; |
my $noteps; |
my %prog_state; |
my %prog_state; |
if ($adv) { %prog_state=&Apache::lonhtmlcommon::Create_PrgWin('','Coverting Images to EPS','Picture Conversion Status',$#content_of_file); } |
if ($adv) { %prog_state=&Apache::lonhtmlcommon::Create_PrgWin('','Coverting Images to EPS','Picture Conversion Status',$#content_of_file,'inline','75'); } |
foreach $not_eps (@content_of_file) { |
foreach $not_eps (@content_of_file) { |
chomp($not_eps); |
chomp($not_eps); |
if ($not_eps ne '') { |
if ($not_eps ne '') { |
Line 97 END
|
Line 100 END
|
if ($eps_f=~/\/home\/([^\/]+)\/public_html\//) { |
if ($eps_f=~/\/home\/([^\/]+)\/public_html\//) { |
$eps_f=~s/\/home\/([^\/]+)\/public_html/$1/; |
$eps_f=~s/\/home\/([^\/]+)\/public_html/$1/; |
$eps_f = '/home/httpd/prtspool/'.$eps_f; |
$eps_f = '/home/httpd/prtspool/'.$eps_f; |
} else { |
} elsif ($eps_f=~/\/home\/httpd\/html\/res\//) { |
$eps_f=~m/\/home\/httpd\/html\/res\/(.+)/; |
$eps_f=~m/\/home\/httpd\/html\/res\/(.+)/; |
$eps_f = '/home/httpd/prtspool/'.$1; |
$eps_f = '/home/httpd/prtspool/'.$1; |
|
} elsif ($eps_f=~/\/home\/httpd\/lonUsers\//) { |
|
$eps_f=~/$Apache::lonnet::perlvar{'lonUsersDir'}\/([^\/]+)\/\w\/\w\/\w\/(.+)/; |
|
$eps_f = '/home/httpd/prtspool/'.$1.'/'.$2; |
} |
} |
my $path=$eps_f; |
my $path=$eps_f; |
$path=~s/\/([^\/]+)\.eps$//; |
$path=~s/\/([^\/]+)\.eps$//; |
Line 133 END
|
Line 139 END
|
} |
} |
} |
} |
if ($adv) { &Apache::lonhtmlcommon::Close_PrgWin('',\%prog_state); } |
if ($adv) { &Apache::lonhtmlcommon::Close_PrgWin('',\%prog_state); } |
|
unlink($figfile); |
} |
} |
#print "$texfile\n"; #name of the tex file for debugging only |
#print "$texfile\n"; #name of the tex file for debugging only |
my @texfile=($texfile); |
my @texfile=($texfile); |
Line 147 END
|
Line 154 END
|
|
|
my $ind=-1; |
my $ind=-1; |
my %prog_state; |
my %prog_state; |
if ($adv) { %prog_state=&Apache::lonhtmlcommon::Create_PrgWin('','Print Status','Class Print Status',$number_of_files); } |
if ($adv) { %prog_state=&Apache::lonhtmlcommon::Create_PrgWin('','Print Status','Class Print Status',$number_of_files,'inline','75'); } |
my $final_statement="<a href=\"$backref\"><b>Return</b</a> to last resource.<br /><br />Generated PDF File for:<br />"; |
my $final_statement="<a href=\"$backref\"><b>Return</b></a> to last resource.<br /><br />Generated PDF File for:<br />"; |
foreach $texfile (@texfile) { |
foreach $texfile (@texfile) { |
my $status_statement=''; |
my $status_statement=''; |
my $link_text='download PDF'; |
my $link_text='download PDF'; |