The easiest command to compress pdf file

We use pdftk here, pdftk stands for PDF toolkits, is a cross-platform tool for manipulating PDF files.

How to install pdftk?

How to compress PDF via pdftk?

You can also decompress by replacing ‘compress’ keyword with ‘uncompress’

That’s all. Notes that the compression usually works with images only, may not work on the file only contains text and simple shapes.