diff --git a/C4/Labels.pm b/C4/Labels.pm index 9992526093..e4fbd5d650 100644 --- a/C4/Labels.pm +++ b/C4/Labels.pm @@ -1202,6 +1202,7 @@ sub DrawBarcode { ySize => ( .02 * $height ), xSize => $xsize_ratio, hide_asterisk => 1, + mode => 'graphic', # the only other option here is Type3... ); }; if ($@) { @@ -1227,6 +1228,7 @@ sub DrawBarcode { ySize => ( .02 * $height ), xSize => $xsize_ratio, hide_asterisk => 1, + mode => 'graphic', # the only other option here is Type3... ); }; @@ -1252,7 +1254,8 @@ sub DrawBarcode { ySize => ( .02 * $height ), xSize => $xsize_ratio, hide_asterisk => 1, - text => 0, + text => 0, + mode => 'graphic', # the only other option here is Type3... ); }; @@ -1370,6 +1373,7 @@ sub build_circ_barcode { xSize => .85, ySize => 1.3, + mode => 'graphic', # the only other option here is Type3... ); }; if ($@) { diff --git a/labels/label-print-pdf.pl b/labels/label-print-pdf.pl index c66162b7bf..51fefe1281 100755 --- a/labels/label-print-pdf.pl +++ b/labels/label-print-pdf.pl @@ -106,6 +106,17 @@ my $lowerLeftY = 0; my $upperRightX = $page_width; my $upperRightY = $page_height; +warn "Active profile: " . ($profile->{prof_id} || "None") if $DEBUG; + +#### PRINT PRELIMINARY DATA #### +print $cgi->header( -type => 'application/pdf', -attachment => 'barcode.pdf' ); + # Don't print header until very last possible moment + # That way if error or die occurs, fatals_to_browser will still work. + # After we print this header, there is no way back to HTML. All we can do is deliver PDF. +prInitVars(); +$| = 1; +prFile(); # No args means to STDOUT +prCompress(1); # turn on zip compression which dramatically reduces file size prMbox( $lowerLeftX, $lowerLeftY, $upperRightX, $upperRightY ); my $codetype; # = 'Code39';