Created
January 30, 2015 07:26
-
-
Save vargheseraphy/6b43816abb14bdc73c27 to your computer and use it in GitHub Desktop.
Pdf Compression and reduction
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
qpdf --linearize input.pdf output.pdf |
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
I had the same problem and found two different solutions (see this thread for more details). Both reduced the size of my uncompressed PDF dramatically. | |
Pixelated (lossy): | |
convert input.pdf -compress Zip output.pdf | |
Unpixelated (lossless, but may display slightly differently): | |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dBATCH -dQUIET -sOutputFile=output.pdf input.pdf | |
Edit: I just discovered another option (for lossless compression), which avoids the nasty gs command. qpdf is a neat tool that converts PDFs (compression/decompression, encryption/decryption), and is much faster than the gs command: | |
qpdf --linearize input.pdf output.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment