blob: 0b9da37de65ccc28e795b3fdfa60ad7f924c00aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#!/bin/bash
# PDF Compressor
# Dependencies: ghostscript
# Note to self: "prepress" can also be "ebook"
if [[ -e $1 ]]; then
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile="${1}_compressed.pdf" "$1" &&
printf "done" || printf "error"
fi
|