Clioos › Guides › Compress PDF

How to Compress a PDF

By Clioos 团队

Compression works by downsampling images and recompressing them — so it only helps PDFs that actually contain large images. Tested 2 November 2026 with Ghostscript 10.02.1: a 4-page photo-heavy A4 report went from 1,851,625 bytes to 342,128 bytes at ebook quality (81.5% smaller) and to 93,687 bytes at screen quality (94.9% smaller). A text-only control PDF went the other way, from 2,667 to 3,933 bytes. Clioos does not offer a compression tool — this guide teaches the free offline method.

At a glance

Steps

  1. Install Ghostscript: on Linux it is usually already there (gs --version); on macOS brew install ghostscript.
  2. Run the ebook preset from the original file: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.7 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed.pdf input.pdf.
  3. Check the result: ls -la for the size and pdfinfo compressed.pdf for the page count. On the test file, 4 pages stayed 4 pages and the size fell from 1,851,625 to 342,128 bytes.
  4. If you need it smaller, re-run from the original with -dPDFSETTINGS=/screen: the test file fell to 93,687 bytes (94.9% smaller), with visibly softer images.
  5. Open the compressed file and check a photo page before you send it — ebook quality is fine on screen, but small text inside images can soften.

Worked example (tested 2 November 2026)

Test file: a 4-page A4 report with a large photo on every page (1,851,625 bytes). Method: Ghostscript 10.02.1, run from the original file each time — never from an already compressed output.

PresetOutput sizeSmaller byPagesTime
Original1,851,625 bytes—4—
/ebook (150 DPI images)342,128 bytes81.5%4under 1 s
/screen (72 DPI images)93,687 bytes94.9%4under 1 s

Control test, same tool and preset: a 3-page text-only PDF went from 2,667 bytes to 3,933 bytes — it grew by 47.5%. That is the honest limit of this method: if your PDF has no large images, compression has nothing to squeeze, and the rewritten file can come out larger. Check the output size before you replace the original.

Which preset to pick

What it can't do

Free alternatives, honestly compared

Frequently asked questions

Is it free to compress a PDF?

Yes, with Ghostscript — free and open source, no per-file charge. Browser tools are free up to a daily limit.

How much smaller will my PDF get?

It depends on the images inside. A photo-heavy PDF shrank 81.5% in our test; a text-only PDF grew. Run the command and check the output size — don't assume.

Will compression hurt quality?

At ebook quality, text stays sharp and photos look fine on screen. At screen quality, images soften visibly when zoomed. Keep the original either way.

Can I compress a PDF on my phone?

Ghostscript needs a computer. On a phone, browser tools work, but they upload your file to their server.

What if the PDF is password-protected?

Unlock it first with the password. Compression tools can't open a password-protected file on their own.


Related guides: How to split a PDF · How to merge PDF files · How to convert PDF to PNG · All guides · Tool: PDF Probe