Inside PDF Compression: Downsampling, Font Subsetting and Object Streams
Two PDFs can both be ten pages long and differ in size by a factor of a hundred. One is a crisp 80 kilobytes; the other refuses to attach to an email at 18 megabytes. The difference is almost never the words. It is what else the file carries: images stored at far higher resolution than anyone will see, complete font programs embedded to render a handful of characters, and layers of editing history never cleaned away.
This guide explains where the bytes in a PDF actually live and what each compression technique really does to them. It is the technical companion to our practical guides on how to reduce PDF file size and compressing a PDF for email — if those tell you which button to press, this one tells you what the button does, so you can predict the result and recognise when a promised saving is impossible.
Try it free: Compress PDF
Shrink a PDF right now — free, private, in your browser.
Open Compress PDFWhere the bytes actually live
A PDF is not a picture of pages. It is a small database of objects: content streams describing text and drawing operations, image objects, font objects, metadata, annotations, form data and a cross-reference structure tying everything together. When people say a PDF is "big", they almost always mean one of three things is big.
First, and by a wide margin, are images. A scanned page is a single image, and a scanner set to high resolution in colour can produce several megabytes per page. Photographs pasted into reports and screenshots at full screen resolution add up the same way. In image-heavy documents, images commonly account for well over nine tenths of the file size — which is why nearly every meaningful compression technique is, at heart, an image technique.
Second are embedded fonts. To guarantee a document looks identical everywhere, producers embed font programs inside the file. A complete font can be hundreds of kilobytes or more, and a document using several typefaces embeds several fonts. If the document only uses forty distinct characters from one of them, most of that data is dead weight — exactly what font subsetting removes.
Third is structural overhead: uncompressed content streams, duplicated resources, thumbnails, embedded files, metadata, and the leftovers of incremental saves. Together, in a much-edited file, they can rival the real content. Our guide to PDF metadata covers one small part of this picture.
Plain text, by contrast, is tiny — a few kilobytes as a content stream, and less once compressed. That is the most useful fact in this article: if your PDF is large, do not blame the text. Find the images, the fonts, or the history.
Lossless versus lossy: the only distinction that matters for quality
Every technique falls into one of two families. Lossless techniques shrink the file while keeping everything needed to reconstruct exactly the same document; nothing visible changes, ever. Lossy techniques deliberately discard information — usually image detail — for much larger savings. Discarded information cannot be recovered, which is why you should always compress a copy and keep the original.
A good workflow applies lossless steps first, because they are free. Only if the file is still too large should lossy image treatment begin, and then gradually, checking the result at the size the document will actually be read. Many disappointing results come from reversing this order — aggressively recompressing images in a file whose real problem was editing bloat a simple rewrite would have removed for nothing.
Content-stream compression and object streams
The instructions that draw each page — place this text here, draw this line, show this image — are stored in content streams. Early PDFs often stored them uncompressed, which is why very old files sometimes shrink dramatically under any modern tool. Applying a general-purpose compression filter, most commonly the Flate method based on the same deflate algorithm used in ZIP files, reduces stream data substantially with zero loss.
Object streams, introduced in PDF 1.5, go further. In a classic PDF, the small dictionary objects describing pages, fonts and resources sit as plain text, each with its own overhead. An object stream packs many of them into one compressed stream, and a compressed cross-reference stream replaces the plain-text lookup table. For documents with thousands of small objects, this alone can save a noticeable share of the file. The trade-off is compatibility: object streams need a reader that understands PDF 1.5 or later — in practice every current reader, though archival workflows sometimes avoid them deliberately.
Image downsampling: where the big savings — and the real risks — are
Downsampling means reducing the number of pixels in an image. Its power is simple arithmetic: halving an image's width and height quarters its pixel count. A photograph embedded at 300 dots per inch but only viewed on screen, where roughly 100 to 150 dots per inch looks perfectly sharp, carries around four times the data it needs. Resampling it to match its displayed size is the largest single saving available for most real-world PDFs.
The key phrase is "matched to its displayed size". Resolution only has meaning relative to the size at which the image appears: a small logo needs few pixels, a full-page photograph needs many. Sensible compressors set a target resolution suited to screen reading or office printing, and leave images already below it untouched. The risk is choosing for the wrong future — a file downsampled for screen will look soft printed large. Decide what the document is for first.
Downsampling is usually paired with recompression. Colour photographs are typically stored with JPEG compression, which discards detail the eye notices least; lowering the quality setting shrinks the data further at the cost of softness and, at aggressive settings, blocky artefacts around sharp edges. Black-and-white scans use specialised schemes instead: methods in the JBIG2 family represent scanned text extremely compactly by matching repeated letter shapes to a shared dictionary. That efficiency carries a caution — pattern matching must be used in lossless or carefully controlled modes for documents where every character matters, such as contracts and records, because an over-aggressive matcher can in principle substitute a similar-looking character. For legal and archival scans, prefer conservative settings and proofread the result.
Font subsetting: keeping the letters, dropping the alphabet
A producer embedding a font can embed the complete program — every character, every language, every symbol — or a subset: a reduced font containing only the characters the document actually uses. An English report might use fewer than a hundred distinct glyphs from a font containing thousands. Subsetting keeps exactly those glyphs, with the metrics needed to lay them out, and discards the rest.
The saving can be substantial when several full fonts are embedded, and it is entirely lossless for reading and printing. The one limitation appears when someone later tries to edit the text: characters never used in the original may not exist in the subset, forcing an editor to substitute another font or re-embed the full one. For final documents this hardly matters; for drafts edited on other machines, full embedding is friendlier. Most modern producers subset by default, so the files that benefit most today are older documents and files from tools with conservative defaults.
Removing orphaned objects and duplicated resources
PDFs accumulate rubbish. Delete a page and its images may remain, unreferenced. Merge carelessly and the same logo or font may be embedded five times. Replace a photograph and the old version can linger. These unreferenced or duplicated objects are called orphans, and a thorough compressor cleans up: walk the document from its root, mark everything actually reachable, and drop the rest.
Deduplication is the companion step: an image appearing on twenty pages only needs storing once, referenced twenty times. Well-produced files already work this way; files assembled by naive merging often do not. That is why re-saving a merged document with a competent tool, such as our Merge PDF tool followed by a compression pass, sometimes recovers surprising space without touching quality.
Incremental updates: why "Save As" shrinks files
PDF was designed so small changes could be saved quickly. Instead of rewriting the whole file, an editor can append an incremental update: the changed objects written again at the end, plus a new cross-reference section pointing to the latest versions. This is fast and, for signed documents, essential, because it preserves the original bytes a signature covers. But the old versions never leave. Edit a file fifty times and it may hold fifty layers of history, including pages you thought you had deleted — a privacy point too, since "deleted" content in an incrementally saved file may still be recoverable.
A full save — the classic "Save As" — rewrites the document from its current state only. Superseded objects and dead space disappear. When saving a copy magically halves a PDF, this rewrite is almost always the explanation. If you try one experiment after this guide, make it this: save a copy of your largest PDF under a new name and compare sizes before reaching for aggressive image settings.
Which technique helps which kind of PDF
The table below summarises where the wins are for common document types. Use it to set expectations, and to diagnose a disappointing result afterwards: if a technique marked "low" was the only one applied, the small saving was predictable.
| Technique | Scanned documents | Photo-heavy reports | Born-digital text documents | Often-edited files |
|---|---|---|---|---|
| Image downsampling | High — scans are usually oversized | High — the dominant saving | Low — few or no images | Varies with content |
| Image recompression | High for colour scans; use care with text scans | High | Low | Varies with content |
| Font subsetting | Low — scans have little live text | Medium | Medium to high if full fonts embedded | Medium |
| Stream and object-stream compression | Low to medium | Medium | Medium — helps older uncompressed files most | Medium |
| Removing orphans and duplicates | Low | Medium after merges | Low to medium | High |
| Full rewrite (Save As) | Low unless edited | Low unless edited | Low unless edited | High — removes update layers |
Realistic expectations, document by document
Scanned paperwork offers the largest wins. A colour scan stored at high resolution can often be reduced to a tenth of its size or less while remaining perfectly legible, by downsampling to reading resolution and recompressing sensibly. Pure black-and-white text scans reach similar results with efficient monochrome compression while keeping edges crisp.
Photo-heavy reports and presentations usually shrink by half or more once images are matched to their placed size. Exports are notorious for embedding photographs at camera resolution even when they appear two inches wide on the page. Only the invisible surplus pixels go.
Born-digital office documents are already fairly lean. Expect modest savings, perhaps a tenth to a third, mostly from font subsetting and stream compression. If such a file is mysteriously huge, investigate rather than compress harder: usually a single embedded image or a stack of incremental updates is responsible.
Print-ready files should barely be compressed at all. They carry high-resolution images and full fonts on purpose. Squeezing one for email is legitimate only if everyone understands the result is a reading copy, not a replacement master.
A sensible compression order
Together, the techniques suggest a reliable sequence. Work on a copy. Rewrite the file fully and apply all lossless steps: stream compression, font subsetting, orphan removal and deduplication. Measure — many files are already small enough, with quality intact. Only if the target is still missed, downsample images to a resolution honest for the document's real use. Finally, inspect the hardest pages — dense tables, small print, diagrams — at full size before sending. For a strict email limit, our guide to compressing a PDF for email walks through that process, and the Compress PDF tool here handles everyday jobs privately in your browser.
A large file, understood this way, is not a mystery; it is a clue pointing at images, fonts or history. Treat the cause rather than the symptom, and you will almost always get a smaller file that still looks exactly like the one you meant to send.
Related guides
Frequently asked questions
Why is my PDF so large when it only has a few pages?
Page count is a poor guide to file size. A single page carrying one high-resolution scanned image can be larger than a hundred pages of plain text, because images, embedded fonts and leftover objects from editing usually account for almost all of the bytes in a PDF.
Does PDF compression always reduce quality?
No. Structural compression such as compressing content streams, subsetting fonts and removing orphaned objects is lossless and changes nothing you can see. Only image downsampling and lossy recompression trade quality for size, and even then the loss is invisible if the target resolution still matches how the document will be viewed or printed.
Why does Save As sometimes shrink a PDF more than a compressor?
Many editors save changes as incremental updates appended to the end of the file, so old versions of edited objects stay inside the file. Save As rewrites the document from scratch, dropping superseded objects and dead space. That rewrite alone can remove a large share of the bloat without touching image quality at all.
Can a text-only PDF be compressed much further?
Usually not by much. Born-digital text is already compact, especially once content streams are compressed and fonts are subsetted. If a text-heavy file is still large, look for embedded full fonts, scanned pages saved as images, or accumulated incremental updates rather than expecting another large saving.
What is the safest way to compress a PDF I need to archive?
Keep the original untouched and compress a copy using lossless structural steps first. Only apply image downsampling if you are confident the archive will never need print-quality resolution, and record the settings you used alongside the file so a future reader knows what was changed.
Private by design: SwiftPDF tools run entirely in your browser — your files never leave your device.