Diff for /loncom/interface/printout.pl between versions 1.172 and 1.174

version 1.172, 2024/07/11 15:24:01 version 1.174, 2024/10/19 05:33:45
Line 447  foreach $texfile (@texfile) { Line 447  foreach $texfile (@texfile) {
   $new_name_file =~ s/\.dvi/\.ps/;    $new_name_file =~ s/\.dvi/\.ps/;
 # Explicitly include a switch for papertype, otherwise dvips will default  # Explicitly include a switch for papertype, otherwise dvips will default
 # to whatever is listed first in config.ps (which in most cases is a4).  # to whatever is listed first in config.ps (which in most cases is a4).
 # Historically (since 2004) LON-CAPA printing expected to use the default,    my $papera;
 # i.e., a papertype of a4, when the user selected letter [8 1/2 x 11 in]     unless ($paper eq '') {
 # in the Layout options, so I follow that convention if $papera is letter.          $papera='-t'.$paper;
   my $papera=$paper;    }
   if ($papera eq 'letter') {$papera='a4';}  
   if ($papera ne '') {$papera='-t'.$papera;}  
   my $extra_ps_header = $perlvar{'lonLib'} .'/includepsheader.ps';    my $extra_ps_header = $perlvar{'lonLib'} .'/includepsheader.ps';
   my $comma = "dvips $papera -h $extra_ps_header -Ppdf -G0 -o  $new_name_file";    my $comma = "dvips $papera -h $extra_ps_header -Ppdf -G0 -o  $new_name_file";
   &busy_wait_command("$comma $name_file 1>/dev/null 2>/dev/null",    &busy_wait_command("$comma $name_file 1>/dev/null 2>/dev/null",
Line 592  foreach $texfile (@texfile) { Line 590  foreach $texfile (@texfile) {
                                'a5'=>'<< /PageSize [421.1 595.2] >> setpagedevice',                                 'a5'=>'<< /PageSize [421.1 595.2] >> setpagedevice',
                                'a6'=>'<< /PageSize [298.75 421.1] >> 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";
   open(FFH,'<',$ps_file) || die "Couldn't open ps file $ps_file for reading: $!\n";        my $new_ps_file='new'.$ps_file;
   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";
   open(FFHS,'>',$new_ps_file) || die "Couldn't open new ps file $new_ps_file for reading: $!\n";        print FFHS $addtoPSfile->{$paper}."\n";
   print FFHS $addtoPSfile->{$paper}."\n";        while (<FFH>) {
   while (<FFH>) {            print FFHS $_;
       print FFHS $_;  
   }  
   close(FFH);  
   close(FFHS);  
   $ps_file=$new_ps_file;    
       }        }
         close(FFH);
         close(FFHS);
         $ps_file=$new_ps_file;  
       &busy_wait_command("ps2pdf13 $ps_file $pdf_file 1>/dev/null 2>/dev/null",        &busy_wait_command("ps2pdf13 $ps_file $pdf_file 1>/dev/null 2>/dev/null",
  "for $status_statement now Converting PS to PDF",   "for $status_statement now Converting PS to PDF",
  \%prog_state,$pdf_file);   \%prog_state,$pdf_file);

Removed from v.1.172  
changed lines
  Added in v.1.174


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>