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.
Related guides
All guides β- How to Compress a PDFThe whole process is four steps and zero uploads. This guide also explains what each compression level actually does so you can pick deliberately.
- Reducing PDF File Size for Email AttachmentsAttachment limits are the number-one reason files need shrinking. A three-move playbook handles essentially every case.
- Converting Word Documents to PDFOne upload, one download, layout intact. This is Filorraβs one upload-based family of tools, and this guide is explicit about what that means.
- How to Merge PDF Files (In the Right Order)Merging is easy; merging in the intended order on the first try takes thirty seconds of preparation. Here is the difference.
Related questions
All questions β- Does Compressing a PDF Reduce Its Quality?Text: no visible change, ever. Images: possibly, depending on level. The honest answer is per-element, not per-file.
- Why Is My PDF File So Large?Almost always images: scans and photos embedded at full resolution dominate everything else. Fonts and export settings play supporting roles.
- Is It Safe to Use an Online PDF Compressor?It depends entirely on where the file is processed. Browser-based tools never receive your file; upload-based ones do.
- How Do I Merge PDF Files Into One Document?Add the files, put them in the right order, click merge. The whole job runs in your browser and takes less than a minute.
Related reading
All articles β- Organizing Pages Inside PDFsScanners produce sideways pages, downloads arrive as monoliths, and packets need assembly. Page-level operations fix all three.
- A Short History of the PDF FormatThe PDF survived platform wars, browser indifference, and its own complexity to become the only format everyone trusts for final documents.
- PDF vs DOCX: Which Format Should You Send?One format freezes intent; the other invites edits. Choosing wrong produces either uneditable headaches or quietly altered documents.
- Reading Regex Without FearRegex looks like line noise because it compresses a whole language into punctuation. Learn the eight moves and any pattern becomes parseable.