summaryrefslogtreecommitdiffstats
path: root/perl-install/printer.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2001-08-08 23:33:03 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2001-08-08 23:33:03 +0000
commit60a03f6dd42238553aa7947c22a8d3b9384130d6 (patch)
tree4ca2d07c7a8a6e02cac8403e952edb4c5edf675b /perl-install/printer.pm
parent500dd3b1a4981336166a6309bac878d476a3c52f (diff)
downloaddrakx-60a03f6dd42238553aa7947c22a8d3b9384130d6.tar
drakx-60a03f6dd42238553aa7947c22a8d3b9384130d6.tar.gz
drakx-60a03f6dd42238553aa7947c22a8d3b9384130d6.tar.bz2
drakx-60a03f6dd42238553aa7947c22a8d3b9384130d6.tar.xz
drakx-60a03f6dd42238553aa7947c22a8d3b9384130d6.zip
Different choosable test pages available now
Diffstat (limited to 'perl-install/printer.pm')
-rw-r--r--perl-install/printer.pm13
1 files changed, 11 insertions, 2 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index 12e11f260..e916ce6df 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -673,8 +673,17 @@ sub print_pages($@) {
# Print the pages
foreach (@pages) {
- run_program::rooted($prefix, $lpr, "-s", $printer->{SPOOLER},
- "-P", $queue, $_);
+ my $page = $_;
+ # Only text and PostScript can be printed directly with all spoolers,
+ # images must be treated seperately
+ if ($page =~ /\.jpg$/) {
+ system(($::testing ? "$prefix" : "chroot $prefix/ ") .
+ "convert $page -page 427x654+100+65 PS:- | " .
+ "$lpr -s $printer->{SPOOLER} -P $queue");
+ } else {
+ run_program::rooted($prefix, $lpr, "-s", $printer->{SPOOLER},
+ "-P", $queue, $page);
+ }
}
sleep 5; #- allow lpr to send pages.
# Check whether the job is queued