X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=scripts%2Fnup.sh;h=f882f34febe0af6a12cd830de2e1f1f5e5103855;hb=e9373c7fb2d2c940fdbe2074771942f2aa5079d2;hp=f880985a4f08df283e36c16af4427e50c60611f0;hpb=243966d4bea9be581b13210dc36b53c40b899a8f;p=hacks%2FsimpleWebSlides.git diff --git a/scripts/nup.sh b/scripts/nup.sh index f880985..f882f34 100755 --- a/scripts/nup.sh +++ b/scripts/nup.sh @@ -6,5 +6,11 @@ if [ -z "$OUTDIR" ]; then OUTDIR="." fi OUTPUT="$OUTDIR"/$(basename "$INPUT" .pdf)"_print.pdf" - -pdfjam --landscape --nup 2x2 --scale 0.9 --paper a4 -o "$OUTPUT" "$INPUT" +TMP="$OUTDIR"/tmp.pdf +rm -rf "$TMP" "$OUTPUT" +pdfjam --landscape --nup 2x2 --scale 0.9 --paper a4paper -o "$TMP" "$INPUT" +gs -sOutputFile="$OUTPUT" -sPAPERSIZE=a4 -sDEVICE=pdfwrite -sPAPERSIZE=a4 -dCompatibilityLevel=1.3 \ + -dDEVICEWIDTHPOINTS=841 \ + -dDEVICEHEIGHTPOINTS=545 \ + -dNOPAUSE -dQUIET -dBATCH -sPAPERSIZE=a4 "$TMP" +rm -f "$TMP"