diff --git a/pdf/reduce_pdf_size.sh b/pdf/reduce_pdf_size.sh new file mode 100755 index 0000000..5556ea7 --- /dev/null +++ b/pdf/reduce_pdf_size.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# PDFSETTINGS: +# -dPDFSETTINGS=/screen lower quality, smaller size (72 dpi) +# -dPDFSETTINGS=/ebook better quality, larger size (150 dpi) +# -dPDFSETTINGS=/prepress same as Acrobat Distiller "Prepress Optimized" setting (300 dpi) +# -dPDFSETTINGS=/printer same as Acrobat Distiller "Print Optimized" setting (300 dpi) +# -dPDFSETTINGS=/default useful across a wide variety of uses, which may result in a larger output file +if [ "$#" -ne 2 ]; then + echo "usage: $0 INPUT_FILE OUTPUT_FILE" + exit 1 +fi +gs -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile="$2" "$1"