Skip to main content

Blog Β· PDF Tools

How PDF Compression Actually Works

Published Β· 2 min read

Compression sounds like squeezing, but most of the win comes from housekeeping: right-sized images, tidier packaging, fewer duplicates.

Watch a 40 MB scanned contract collapse to 3 MB and it feels like magic, or like theft. Neither: compression is a set of specific, understandable operations applied to specific kinds of waste. Knowing them turns the size slider from superstition into engineering.

This article walks through what actually changes inside a compressed PDF, ordered by how much each operation typically contributes to savings.

Images first, always: downsampling and re-encoding

The dominant operation is bringing images down to display-appropriate resolution. A scan stored at 600 DPI for a document viewed at 96 DPI carries six times too many pixels per dimension; halving resolution quarters pixel count. Compressors detect or assume target resolutions and resample accordingly.

Re-encoding follows: images stored losslessly (or with inefficient legacy codecs) get re-encoded as well-tuned JPEG, where quality settings trade imperceptible fidelity for large byte reductions. On image-heavy documents these two steps routinely account for 80 percent of total savings.

Packaging: object streams and cross-reference tables

A PDF is a database of objects (pages, fonts, images, drawing commands) plus an index saying where each lives. Older writers store objects verbosely and index them in ways that waste space; modern compression bundles hundreds of small objects into compressed streams and rewrites compact indexes.

This restructuring is perfectly lossless: every object survives bit-for-bit semantically. It is pure logistics, which is why text-heavy documents that shrink 60 percent show zero visual change. The content was fine; the filing system was a mess.

Fonts: subsetting to used glyphs only

An embedded font can carry thousands of glyphs across multiple weights when the document uses two hundred characters. Subsetting keeps exactly the glyphs used (plus a safety margin) and drops the rest, often saving hundreds of kilobytes on decorative typefaces with enormous character sets.

Done correctly, subsetting is invisible: rendering is identical because every needed glyph remains. Done aggressively without care, it breaks documents later edited to add new characters, which is why archival formats sometimes forbid it.

Deduplication and dead-weight removal

Documents edited through many save cycles accumulate orphans: superseded image versions, unused resources, revision history viewers politely hide. Compression passes identify unreferenced objects and drop them, and deduplicate identical resources embedded repeatedly (the same logo pasted forty times need exist once).

Incremental-update PDFs are the classic hoarders: each save appends rather than rewrites, so a one-page letter edited twenty times may carry nineteen invisible prior versions. A compression pass rebuilds the file clean.

Every compression level is just a different answer to one question: how aggressively should images be resampled and re-encoded? Everything else (streams, fonts, dedup) is unconditional housekeeping that loses nothing.

That is why honest compression promises are element-specific: text and structure survive intact by design, photographs carry the entire trade-off, and the slider exists solely for them.

Frequently asked questions

Is any of this destructive to text?
No. Text is vector description, not pixels; packaging improvements rearrange storage without touching glyph definitions. Zoomed text stays mathematically sharp after any compression level.
Why do some PDFs barely compress?
Files written efficiently already (modern exporters, sensible image settings) contain little waste. Compression removes inefficiency; it cannot shrink data that is already minimal.
All guides β†’
All questions β†’
All articles β†’