]> piware.de Git - bin.git/commitdiff
scandoc: Move from pdfjam to pdfmerge
authorMartin Pitt <martin@piware.de>
Sat, 17 Dec 2022 09:49:23 +0000 (10:49 +0100)
committerMartin Pitt <martin@piware.de>
Sat, 17 Dec 2022 09:49:23 +0000 (10:49 +0100)
That is much smaller, and avoids installation of TeXlive.

scandoc

diff --git a/scandoc b/scandoc
index f62373cb379c4a795723e2fa57175caca7cd215f..ebbce60c9a2c796f91f5dbd2251ae7fc34528369 100755 (executable)
--- a/scandoc
+++ b/scandoc
@@ -22,6 +22,11 @@ while true; do
     [ "$x" = q ] && break || true
 done
 
-pdfjam --outfile "$name" --fitpaper true --rotateoversize false page*.pdf
+# pdfmerge does not get along with just one input file
+if [ $PAGE -eq 1 ]; then
+    mv page*.pdf "$name"
+else
+    pdfmerge page*.pdf "$name"
+fi
 
 rm -rf "$D"