Linux: Compress PDF – Reduce PDF Size

A scanned document saved as PDF can be too large, that is not always good.

For example, the large size of a PDF file won’t permit to send it by email because of the probable limitation on the maximum size of attachments.

In Linux you can compress a PDF file from the command line without losing its quality, with the help of ps2pdf tool, that is a part of ghostscript suite.

From this article you will learn how to compress a PDF file and significantly reduce its size from the Linux command line.

Cool Tip: Plan to send this PDF somewhere or just keep? How about to protect it with a password? This is really easy for ones who reduce the size of a PDF file from the command line! Read more →

First of all it is required to install the ghostscript suite that provides the ps2pdf utility:

$ sudo apt-get install ghostscript

Compress PDF File In Linux

Run the following command to compress and reduce the size of the LARGE.pdf file and save the result to the SMALL.pdf file:

$ ps2pdf LARGE.pdf SMALL.pdf

Effectiveness is obvious:

$ du -sh *.pdf
7,6M	LARGE.pdf
500K	SMALL.pdf

One Reply to “Linux: Compress PDF – Reduce PDF Size”

  1. Thank you very much for your hack! It worked like a charm and I did learn something new.

Leave a Reply