--- loncom/interface/printout.pl 2010/08/26 08:45:08 1.142.6.4 +++ loncom/interface/printout.pl 2009/07/03 16:13:13 1.143 @@ -1,7 +1,7 @@ #!/usr/bin/perl # CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc. # -# $Id: printout.pl,v 1.142.6.4 2010/08/26 08:45:08 raeburn Exp $ +# $Id: printout.pl,v 1.143 2009/07/03 16:13:13 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -171,14 +171,24 @@ Your cookie information is incorrect. END - exit; + return; } my %perlvar=%{&LONCAPA::Configuration::read_conf('loncapa.conf')}; &Apache::lonlocal::get_language_handle(); &Apache::loncommon::content_type(undef,'text/html'); $env{'request.noversionuri'} = '/cgi-bin/printout.pl'; -print(&Apache::loncommon::start_page('Creating PDF')); +# Breadcrumbs +#FIXME: Choose better/different breadcrumbs?!? Links? +my $brcrum = [{'href' => '', + 'text' => 'Helper'}, #FIXME: Different origin possible than print out helper? + {'href' => '', + 'text' => 'Preparing Printout'}, + {'href' => '', + 'text' => 'Creating PDF'}]; +print(&Apache::loncommon::start_page('Creating PDF', + undef, + {'bread_crumbs' => $brcrum,})); my $identifier = $ENV{'QUERY_STRING'}; my $texfile = $env{'cgi.'.$identifier.'.file'}; @@ -468,15 +478,16 @@ foreach $texfile (@texfile) { my $pdf_file = $1.'.pdf'; $papera=~s/t/p/; if ($laystyle eq 'album' and $numberofcolumns eq '2') { - $comma = "psnup $papera -2 -s1.0 $new_name_file"; + $comma = "fixps --force ".$new_name_file." | psnup $papera -2 -s1.0 "; &debug("PSNUP command: $comma"); - &busy_wait_command("$comma $tempo_file 1>/dev/null 2>/dev/null", + &busy_wait_command("$comma 1>$tempo_file 2>/dev/null", "for $status_statement now Modifying PS layout", \%prog_state,$tempo_file); } elsif ($laystyle eq 'book' and $numberofcolumns eq '2') { - $comma = 'pstops '.$papera.' "2:0+1(0.48w,0)" '.$new_name_file; + $comma = 'fixps --force '.$new_name_file.' | pstops '.$papera.' "2:0+1(0.48w,0)"'; &debug("PSTOPS command: $comma "); - &busy_wait_command("$comma $tempo_file 1>/dev/null 2>/dev/null", + + &busy_wait_command("$comma 1>$tempo_file 2>/dev/null", "for $status_statement now Modifying PS layout", \%prog_state,$tempo_file); } else {