diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2002-08-26 14:45:33 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2002-08-26 14:45:33 +0000 |
commit | 61decf67083304dba77ff8cd11890a86d4dedd05 (patch) | |
tree | 4f2c75a76bbd7370d305746556ffa25677a7a2a1 /perl-install/printer.pm | |
parent | 3401c296c098633573ae9dfb0a4138f99e0e1cc4 (diff) | |
download | drakx-61decf67083304dba77ff8cd11890a86d4dedd05.tar drakx-61decf67083304dba77ff8cd11890a86d4dedd05.tar.gz drakx-61decf67083304dba77ff8cd11890a86d4dedd05.tar.bz2 drakx-61decf67083304dba77ff8cd11890a86d4dedd05.tar.xz drakx-61decf67083304dba77ff8cd11890a86d4dedd05.zip |
Dialog for printing test pages: Unmark all test pages when "No test
pages" is marked.
Accelerated printing of the photo test page when CUPS is the spooler,
the internal image converter of CUPS is faster than ImageMagick.
Diffstat (limited to 'perl-install/printer.pm')
-rw-r--r-- | perl-install/printer.pm | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm index 622c85bbc..9255411c9 100644 --- a/perl-install/printer.pm +++ b/perl-install/printer.pm @@ -1526,10 +1526,19 @@ sub print_pages($@) { # Only text and PostScript can be printed directly with all spoolers, # images must be treated seperately if ($page =~ /\.jpg$/) { - system(($::testing ? $prefix : "chroot $prefix/ ") . - "/usr/bin/convert $page -page 427x654+100+65 PS:- | " . - ($::testing ? $prefix : "chroot $prefix/ ") . - "$lpr -s $printer->{SPOOLER} -P $queue"); + if ($printer->{SPOOLER} ne "cups") { + # Use "convert" from ImageMagick for non-CUPS spoolers + system(($::testing ? $prefix : "chroot $prefix/ ") . + "/usr/bin/convert $page -page 427x654+100+65 PS:- | " . + ($::testing ? $prefix : "chroot $prefix/ ") . + "$lpr -s $printer->{SPOOLER} -P $queue"); + } else { + # Use CUPS's internal image converter with CUPS, tell it + # to let the image occupy 90% of the page size (so nothing + # gets cut off by unprintable borders) + run_program::rooted($prefix, $lpr, "-s", $printer->{SPOOLER}, + "-P", $queue, "-o", "scaling=90", $page); + } } else { run_program::rooted($prefix, $lpr, "-s", $printer->{SPOOLER}, "-P", $queue, $page); |