--- loncom/interface/lonprintout.pm 2009/04/17 10:08:42 1.550 +++ loncom/interface/lonprintout.pm 2009/04/20 09:57:17 1.551 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.550 2009/04/17 10:08:42 foxr Exp $ +# $Id: lonprintout.pm,v 1.551 2009/04/20 09:57:17 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -163,7 +163,7 @@ sub include_pdf { $base =~ s/ /\_/g; - my $output = &print_latex_header()."\\begin{document}\n"; + my $output = &print_latex_header(); $output .= '\special{ps: _begin_job_ (' .$base.'.pdf.eps'. ')run _end_job_}'; @@ -1474,7 +1474,11 @@ sub print_construction_sequence { } } elsif ($urlp =~ /\.pdf$/i) { - $result .= &include_pdf($urlp); + &Apache::lonnet::logthis("include_pdf 3"); + + my $texversion = &include_pdf($urlp); + $texversion = &latex_header_footer_remove($texversion); + $result .= $texversion; } } if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\begin{document})/$1 \\fbox\{RANDOM SEED IS $rndseed\} /;} @@ -1692,7 +1696,7 @@ ENDPART && $currentURL=~/\.sequence$/ && $helper->{'VARS'}->{'construction'} eq '1') { #printing content of sequence from the construction space $currentURL=~s|\/~([^\/]+)\/|\/home\/$1\/public_html\/|; - $result .= &print_latex_header($helper->{'VARS'}->{'LATEX_TYPE'}); +# $result .= &print_latex_header($helper->{'VARS'}->{'LATEX_TYPE'}); $result .= &print_construction_sequence($currentURL, $helper, %form, $LaTeXwidth); $result .= '\end{document}'; @@ -1724,7 +1728,9 @@ ENDPART $do_postprocessing = 0; # Don't massage the result. } elsif ($cleanURL =~ /\.pdf$/i) { + &Apache::lonnet::logthis("include_pdf 1"); $result .= &include_pdf($cleanURL); + $result .= '\end{document}'; } else { $result.=&unsupported($currentURL,$helper->{'VARS'}->{'LATEX_TYPE'}, $helper->{'VARS'}->{'symb'}); @@ -1882,6 +1888,8 @@ ENDPART if ($i > 0) { $result .= '\cleardoublepage'; } + &Apache::lonnet::logthis("include_pdf 2"); + $result .= &include_pdf($urlp); if ($i != $#master_seq) { if ($numberofcolumns eq '1') {