How to compress a PDF on Linux

Compress PDFs on Linux two ways — Flint in the browser for one-offs, Ghostscript for scripted batches.

Linux users compressing PDFs have two genuinely good options: the browser for one-off jobs, and Ghostscript for everything else. Most people end up using both.

Browser route: Flint

Flint in Firefox or Chrome. Drag PDF in, pick Light/Medium/Heavy, download. 30 seconds. Same flow on Ubuntu, Fedora, Arch, anywhere.

Good for: one-off compression, GUI users, when you want quick visual quality control across presets.

Ghostscript route: command-line

Ghostscript is the canonical Linux compressor. Example: `gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf in.pdf`. PDFSETTINGS options: /screen (most compressed), /ebook, /printer, /prepress (least compressed).

Good for: batch jobs, scripted workflows, fine control. Steeper learning curve.

When to use which

One-off: Flint. Twenty files to compress with same settings: Ghostscript loop in a shell script. Need to compare quality across compression levels: Flint's presets are easier to evaluate. Need PDFs ingested by an automated pipeline: Ghostscript.

Combining tools

Some Linux users batch-compress with Ghostscript then run individual problem files through Flint for finer quality control. The two aren't exclusive — both have their place in a Linux PDF workflow.

FAQ

Is Ghostscript available on all Linux distros?

Almost. Available in the default repos of Ubuntu, Debian, Fedora, Arch, and most others. Install with apt, dnf, pacman, etc.

Why does Ghostscript output sometimes look worse?

/screen and aggressive settings prioritise file size over quality. Step up to /ebook or /printer for better quality with less compression. Tune to your needs.

Does Flint match Ghostscript quality?

Similar — both use comparable algorithms for image downsampling. Flint's UI makes quality control easier; Ghostscript gives more knobs to turn for power users.

One-off: Flint. Batch: Ghostscript. Both free on Linux.

Try it now

Drop a PDF in and you'll be done in seconds — no install, files private to your account.

More on this

How to Compress a PDF on Linux (Free) | Flint — Flint PDF