PDF & Documents

How PDF compression actually works (and why some files refuse to shrink)

Every "compress PDF" button does roughly four things. Understanding them tells you in advance whether your 40 MB file will drop to 3 MB or stubbornly stay at 39 MB.

3 minute readUpdated 10 October 2026

You drag a 42 MB PDF into a compressor, wait, and get back a 41.6 MB file. The same tool takes someone else's 30 MB scan down to 2 MB. Neither result is a bug, the two files are heavy for completely different reasons.

What is actually inside a PDF

A PDF is not a picture of a page. It is a container holding numbered objects: page definitions, content streams describing where to draw each glyph and line, embedded font programs, images, and a cross-reference table that says where each object lives in the file.

Almost every one of those content streams is already compressed with Flate, the same algorithm as ZIP. That single fact explains most disappointing results: if your PDF is mostly text, the bytes are already squeezed and there is very little left to take.

So when a file is huge, the weight is nearly always in one of three places: images, fonts, or accumulated junk.

The four things a compressor can do

1. Downsample images. A phone photo pasted into a document may be 4000 pixels wide, sitting in a box 6 cm across. At print resolution that box only needs about 700 pixels. Throwing away the other 3300 columns of pixels is invisible on paper and on screen, and it is where the dramatic savings come from.

2. Re-encode images. A page scanned as PNG (lossless) can be re-saved as JPEG at quality 70. For photographic or scanned content the visual difference is small and the size drop is often 80–90%.

3. Subset fonts. A full font file can be several hundred kilobytes because it contains every glyph, including scripts you never used. Subsetting keeps only the characters the document actually prints. Embed four unsubsetted font weights and you have paid a megabyte before writing a word.

4. Remove the leftovers. Page thumbnails, old incremental-save revisions, unused objects, document metadata, embedded file attachments and JavaScript. Individually small, collectively meaningful, and rewriting the cross-reference table as a compressed object stream tidies up the rest.

Why your file behaves the way it does

File type What dominates Realistic saving
Scanned document (images of pages) JPEG/PNG page images 60–90%
Report with photos and charts Embedded images 40–80%
Contract, invoice, text-only Already-deflated text streams 0–10%
Slide deck exported to PDF Background images, embedded fonts 30–70%

If you have a text-only PDF that will not shrink, no tool will fix that, there is simply nothing left to compress. The honest answer is to send it as it is.

The part people get wrong

Compression is lossy for images and lossless for text. That means:

  • Text stays perfectly sharp and selectable no matter how hard you compress. You are never blurring your words.
  • Images degrade permanently. Compress a scan twice and you compress already-compressed JPEG data, which introduces visible blocking around letters.
  • Compress once, from the highest-quality original you have. Repeating the process is how documents end up looking like a photocopy of a fax.

Also worth knowing: compression is not encryption. Shrinking a file does nothing to protect it, and a compressed PDF is exactly as readable to anyone who opens it.

A practical order of operations

  1. Check what you are dealing with. Open the PDF and try to select a sentence with your cursor. If text highlights, it is a digital PDF. If nothing selects, it is a scan and image settings are what matter.
  2. Compress once at a moderate setting and look at the result before going harder.
  3. If a scan is still too large, reduce the target resolution rather than the JPEG quality, 200 DPI is fine for reading on screen, 300 DPI for printing text.
  4. If only three pages of a fifty-page document matter, extract those pages instead. A smaller document beats a degraded one.
  5. Strip metadata separately if privacy is the concern; it barely affects size but it does remove author names, software fingerprints and edit timestamps.

Using the compressor here

The PDF compressor offers the two approaches that decide most results. Keep text selectable rebuilds the file structure and strips metadata, which helps a digital PDF that was saved inefficiently and leaves its text, links and drawings untouched. Compress images redraws every page as a JPEG at 150, 110 or 80 DPI, which is what brings a scan down to size, at the cost of text that can no longer be selected. If neither makes the file meaningfully smaller, the tool says so, and the original is the file to keep.

Further reading

Do it hereCompress PDFShrink a PDF by rebuilding its structure or compressing scanned page imagesOpen

Written for NextTool. Every statement about a tool is checked against that tool's code, and corrections are dated above. How guides are written

pdfcompressionfile-size