summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem.moulin@chalmers.se>2010-09-23 10:29:48 +0200
committerGuilhem Moulin <guilhem.moulin@chalmers.se>2010-09-23 10:29:48 +0200
commit11920045f153fbccf93cffb94b3939e5549262be (patch)
tree6f7100eab82ea8e939d76b449f8b0646d006ec12
parentfcd4b6491cda9843ea44b6cd65959b3cf14126e6 (diff)
typo
-rwxr-xr-xpdftool.pl7
1 files 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;