Is there a free way to compress a PDF? [duplicate]

I have several PDFs that are quite large (one is 80+ MB). Is there a free way to compress that PDF to a smaller size?


There is also Free PDF Compressor. It gives you the option of using the Flate or RunLength compression algorithms as well as different compression levels.

alt text


I guess, the most voluminous parts in your document are the images. How much you could shrink the size then, depends if and how the images are currently compressed.

You can use ghostscript to compress all (especially bitmap) images in your PDF. If you will tolerate a lossy compression, you can simply use the following command (AFAIK JPEG is the default compression):

ps2pdf input.pdf compressed.pdf

And yes, ps2pdf can (despite of its name) also read in PDF files. Of course, there are tons of options for ghostscript, so for details please refer to the documentation.

Here is a comparison between different methods for an example document. (The result will vary very much depending on the contents of the input document, so always recheck the different methods for your situation.)

input.pdf             24 707 180 bytes
output_flate.pdf      23 293 759 bytes   # lossless via Free PDF Compressor 1.12
output_runlength.pdf  23 293 759 bytes   # lossless via Free PDF Compressor 1.12
output_jpeg.pdf       12 503 901 bytes   # lossy via ghostscript

You see, the lossless compression does not gain much im my case, as all images are already flate compressed in input.pdf.


Have you tried compressing your file with the "smallpdf" online pdf compressor? My record is to get 92% compression. :)