---
layout: article.njk
title: How to compress PDF files using open source tools
---

We might create a beautiful looking PDF file with sharp crisp graphics on every page, only to run into a size limitation.  For example, one time I needed to submit a PDF to a website through a web form that limited the size to 5 megabytes.

This goal of squeezing a PDF file runs the risk of ruining those crisp graphics.  Just as I had to compress the PDF to accomplish the task, you may also find yourself needing to compress your PDF creation.

_PDF Document Maker_ does not yet implement this feature.  However, there are plenty of other tools which do.

## Why compress PDF files?

Ideally PDF files are distributed with full fidelity and crisp graphics.  But, there are many scenarios where we must limit the size.

* Submission through e-mail or a web form where the size is limited
* Easing distribution through social networking



https://askubuntu.com/questions/207447/how-to-reduce-the-size-of-a-pdf-file

https://askubuntu.com/questions/280312/gui-program-to-resize-pdf-documents-and-change-their-dpi/280406

Note that Libre Office can open a PDF then save it with different options

https://askubuntu.com/questions/113544/how-can-i-reduce-the-file-size-of-a-scanned-pdf-file

https://superuser.com/questions/685997/how-to-analyze-the-space-usage-within-pdf-document?_gl=1*dugwvm*_ga*MjEzNTQ2MDYxMC4xNzQxMTE2Nzcw*_ga_S812YQPLT2*czE3NTM4MjI2NzAkbzI3JGcxJHQxNzUzODIzNDU3JGo2MCRsMCRoMA..

https://www.npmjs.com/package/compress-pdf -- relies on Ghostscript

GraphicsMagick?  ImageMagick?



