From 11920045f153fbccf93cffb94b3939e5549262be Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 23 Sep 2010 10:29:48 +0200 Subject: typo --- pdftool.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pdftool.pl b/pdftool.pl index c5acd4a..fb1785a 100755 --- a/pdftool.pl +++ b/pdftool.pl @@ -7,7 +7,7 @@ use strict; Getopt::Long::Configure ("bundling"); -# Give an array if the command has any argument. +# Give an array if the command has least one argument. my @pdf2ps = 'pdftops'; my @pscrop = ('psnup2.pl', '-s1', '-l1'); my @psresize = 'psresize'; @@ -69,6 +69,7 @@ if (defined $crop) { $mnup = 0; } } else { + $mcrop = 0; if (not defined $book && $nup > 1) { $mresize = $margin/2; $mnup = $mresize; @@ -154,7 +155,7 @@ if (defined $crop) { } # Psbook -if (defined $crop) { +if (defined $book) { $pid = open2 *PSBOOK, "<&PSCROP", "@psbook" or die "Error with `@psbook"; push @pids, $pid; @@ -168,7 +169,9 @@ $pid = open2 *PSNUP, "<&PSBOOK", @psnup, "-p$papersize", "-m${mnup}cm", "-$nup" or die "Error with `@psnup -p$papersize -m${mnup}cm -$nup'"; push @pids, $pid; +# Convert back to pdf # TODO: not always stdout +# TODO: return same type as input $pid = open2 ">&STDOUT", "<&PSNUP", @ps2pdf, "-sPAPERSIZE=$papersize", '-', '-' or die "Error with `@ps2pdf -sPAPERSIZE=$papersize - -'"; push @pids, $pid; -- cgit v1.2.3