--- loncom/interface/printout.pl 2024/10/16 17:48:08 1.173 +++ loncom/interface/printout.pl 2024/10/19 05:33:45 1.174 @@ -1,7 +1,7 @@ #!/usr/bin/perl # CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc. # -# $Id: printout.pl,v 1.173 2024/10/16 17:48:08 raeburn Exp $ +# $Id: printout.pl,v 1.174 2024/10/19 05:33:45 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -590,18 +590,16 @@ foreach $texfile (@texfile) { 'a5'=>'<< /PageSize [421.1 595.2] >> setpagedevice', 'a6'=>'<< /PageSize [298.75 421.1] >> setpagedevice', }; - if ($paper ne 'letter') { - open(FFH,'<',$ps_file) || die "Couldn't open ps file $ps_file for reading: $!\n"; - my $new_ps_file='new'.$ps_file; - open(FFHS,'>',$new_ps_file) || die "Couldn't open new ps file $new_ps_file for reading: $!\n"; - print FFHS $addtoPSfile->{$paper}."\n"; - while () { - print FFHS $_; - } - close(FFH); - close(FFHS); - $ps_file=$new_ps_file; + open(FFH,'<',$ps_file) || die "Couldn't open ps file $ps_file for reading: $!\n"; + my $new_ps_file='new'.$ps_file; + open(FFHS,'>',$new_ps_file) || die "Couldn't open new ps file $new_ps_file for reading: $!\n"; + print FFHS $addtoPSfile->{$paper}."\n"; + while () { + print FFHS $_; } + close(FFH); + close(FFHS); + $ps_file=$new_ps_file; &busy_wait_command("ps2pdf13 $ps_file $pdf_file 1>/dev/null 2>/dev/null", "for $status_statement now Converting PS to PDF", \%prog_state,$pdf_file);