Created
October 31, 2014 07:04
-
-
Save luikore/2db553db2788e6620113 to your computer and use it in GitHub Desktop.
shrink pdf size
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# need to install ghostscript first | |
pdf-shrink() { | |
if [[ -e $1 ]]; then | |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$2 $1 | |
else | |
echo 'usage: pdf-shrink in.pdf out.pdf' | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment