nup1x3 nup2x3 update to use pdfjam directly
authorDan White <dan@whiteaudio.com>
Wed, 27 Jan 2021 21:33:04 +0000 (15:33 -0600)
committerDan White <dan@whiteaudio.com>
Wed, 27 Jan 2021 21:33:04 +0000 (15:33 -0600)
nup1x3.sh
nup2x3.sh

index 338d05f65c7067dae861f9da041f32d9b251024c..f19d9397ef127adabb8adec65807f4942cb78a6e 100755 (executable)
--- 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}"
index 282ad2f2d00477a021dbd86790527216322db6bc..bc649f0f181d28ff20c77d6291e094eb9a2e5f5a 100755 (executable)
--- 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}"
+