I use pdftk to compress a pdf using the following command line
pdftk file1.pdf output file2.pdf compress
It works as the weight of my file decreased.
Are there [options] to change the compression???
Or maybe other solutions to compress my file? It is heavy because some graphics have a lot of points. Is there a way to convert these graphs to jpg for instance and adapt the compression?
Click the Select a file button above or drag and drop files into the drop zone. Select the PDF file you want to make smaller. After uploading, Acrobat will automatically reduce the PDF size. Sign in to download or share your compressed PDF.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With