From 9b92f05760567961c24f0fd5b1fbee8367691f90 Mon Sep 17 00:00:00 2001 From: Dan White Date: Wed, 27 Jan 2021 15:33:04 -0600 Subject: [PATCH] nup1x3 nup2x3 update to use pdfjam directly --- nup1x3.sh | 17 +++++++++++++++-- nup2x3.sh | 21 ++++++++++++++++++++- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/nup1x3.sh b/nup1x3.sh index 338d05f..f19d939 100755 --- a/nup1x3.sh +++ b/nup1x3.sh @@ -1,8 +1,21 @@ #!/bin/bash -if [ ! -e $(which pdfnup) ]; then +set -euo pipefail + +if [ ! -e $(which pdfjam) ]; then echo "missing texlive-extra-utils" exit 1 fi -pdfnup --nup 1x3 --suffix 1x3 --letterpaper --no-landscape --offset "-3cm 0cm" --delta "0cm 0cm" --scale 0.9 $1 +infile=${1-} +outfile="$(basename ${infile} .pdf)-1x3.pdf" + +pdfjam \ + --nup 1x3 \ + --letterpaper \ + --no-landscape \ + --offset "-3cm 0cm" \ + --delta "0cm 0cm" \ + --scale 0.9 \ + --outfile "${outfile}" \ + "${infile}" diff --git a/nup2x3.sh b/nup2x3.sh index 282ad2f..bc649f0 100755 --- a/nup2x3.sh +++ b/nup2x3.sh @@ -1,3 +1,22 @@ #!/bin/bash -pdfnup --nup 2x3 --suffix 2x3 --letterpaper --no-landscape $1 +set -euo pipefail + +if [ ! -e $(which pdfjam) ]; then + echo "missing texlive-extra-utils" + exit 1 +fi + +infile=${1-} +outfile="$(basename ${infile} .pdf)-2x3.pdf" + + #--offset "-3cm 0cm" \ + #--delta "0cm 0cm" \ + #--scale 0.9 \ +pdfjam \ + --nup 2x3 \ + --letterpaper \ + --no-landscape \ + --outfile "${outfile}" \ + "${infile}" + -- 2.25.1