From 61decf67083304dba77ff8cd11890a86d4dedd05 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Mon, 26 Aug 2002 14:45:33 +0000 Subject: 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. --- perl-install/printer.pm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'perl-install/printer.pm') 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); -- cgit v1.2.1