Last active
February 8, 2017 11:03
-
-
Save SalvadorP/42370f493fc3d44aa1b4ada6c3bf59af to your computer and use it in GitHub Desktop.
Compress pdfs in batch, giving 2 types of qualities.
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
# Less compression nice results, links broken | |
ls | cat -n | while read n f; do ps2pdf "$f" "$f.comp2.pdf"; done | |
# A lot of compression jpg quality loss, respects links, changing PDFSettings can alter results more/less compression/quality | |
ls | cat -n | while read n f; do gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile="$f.comp.pdf" "$f"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment