How to Compress a PDF on Linux — No Install Needed
Linux users often default to Ghostscript for PDF compression, which requires terminal commands and package installation. But if you just need to reduce a PDF's file size quickly, there's a faster option: ShrinkPDF runs entirely in your browser and works on any Linux distro — Ubuntu, Fedora, Debian, Arch, Mint, and more — without installing anything.
Browser Method — Fastest, No Install
Works on any Linux distro with Firefox, Chrome, or Chromium installed — which is essentially every modern Linux desktop.
Open Your Browser
Open Firefox, Chrome, or Chromium. Go to shrinkpdf.fyi. The site works identically on Linux as on any other OS.
Upload Your PDF
Click Choose PDF File. Your file manager (Nautilus on GNOME, Dolphin on KDE, Thunar on XFCE) will open. Navigate to the PDF and select it.
Choose Compression Level
Select Balanced for documents with images. Select Maximum for scanned files, forms, or text-heavy documents.
Download the Compressed PDF
Click Download. The file saves to your ~/Downloads directory. You can also right-click the download notification → Save to a specific folder.
ShrinkPDF uses JavaScript and the WebAssembly runtime in your browser. The PDF is processed on your local CPU — nothing is sent to any server. On a modern Linux machine with 8GB RAM, a 50MB PDF typically compresses in 10–20 seconds.
Ghostscript Method — For Terminal Users
If you prefer the terminal or need to batch-process many files, Ghostscript is the standard Linux tool. Here's the one-liner:
The -dPDFSETTINGS flag controls compression quality:
/screen— 72 DPI, smallest file (equivalent to ShrinkPDF Maximum)/ebook— 150 DPI, good balance (between Balanced and Maximum)/printer— 300 DPI, high quality for printing/prepress— 300 DPI + colour preservation for professional printing
Install Ghostscript if needed:
Browser vs Ghostscript — Which to Use?
- You need to compress one or a few files quickly
- You don't want to open a terminal
- You're on a machine where you can't install packages
- You want a visual preview of the compressed file before downloading
- You need to compress many files at once (batch processing with a loop)
- You want to automate compression as part of a script or cron job
- You need fine-grained control over specific DPI values or colour settings
✓ Compress PDF on Linux — Free, No Install
Works in Firefox, Chrome, and Chromium on any distro.
🗜️ Compress My PDF Now