Created
March 9, 2015 16:00
-
-
Save mmstick/68ef8027825c18a5e959 to your computer and use it in GitHub Desktop.
Finds all PDFs in the current directory and compresses the images contained within them to 150dpi.
This file contains hidden or 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
#!/bin/bash | |
find * -type f -name \*.pdf | parallel -j+0 --gnu nice -n 19 gs -sDEVICE=pdfwrite -dCompatabilityLevel=1.4 -dPDFSETTINGS=/ebook -dDetectDuplicateImages=true -dNOPAUSE -dQUIET -dBATCH -sOutputFile="{.}_compressed.pdf" "{}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment