PDF Compression Explained
"Compress this PDF" sounds like one operation, but a PDF can be compressed in several independent ways. Knowing which is which helps you understand what a compress tool can and cannot do, and why some PDFs shrink dramatically while others barely move.
Fundamentals
Lossy vs lossless
Lossless compression reduces file size without losing any information — the decompressed data is byte-for-byte identical to the original. Lossycompression accepts small visual changes in exchange for much smaller sizes. Photos are usually compressed lossy (JPEG); text and line art are usually compressed lossless (Flate).
A good PDF compress tool applies lossy compression only to images, and only when the quality trade-off is acceptable. Text and vector graphics should always be preserved exactly.
Images
Image compression in PDFs
PDFs can store images with several codecs:
- JPEG — lossy, good for photographs. The most common source of size in image-heavy PDFs.
- Flate (zlib) — lossless, good for line art and images with few colors.
- JBIG2 — lossy or lossless, designed for bitonal (black-and-white) scanned text. Can shrink scanned pages dramatically, but support is uneven.
- CCITT Group 4 — lossless, the classic fax compression for bitonal images.
Re-encoding an image from an oversized JPEG to a smaller one is the single most effective size reduction for most PDFs.
Fonts
Font subsetting
As covered in the file size guide, embedded fonts can dominate a small PDF. Subsetting embeds only the glyphs actually used. A document that uses a 250 KB font for a single heading can drop to a 8 KB subset with no visible change. Most modern PDF writers subset by default; older ones or certain export paths do not.
Structure
Object streams
PDF 1.5 introduced object streams: a way to pack many small objects (metadata, page descriptions, font descriptors) into a single compressed stream. Older PDFs store each object separately with its own overhead. Re-saving with object streams can shave a meaningful percentage off text-heavy documents without touching any visible content.
This is the part of compression that is always safe — it is purely structural, lossless, and invisible to the reader.
Limits
What compression cannot do
A lossless compress pass will not shrink a PDF that is already well-encoded. If the file already uses object streams, subsets its fonts, and stores images as sensibly compressed JPEGs, there is little structural fat left to trim. Tools that promise dramatic reductions on every file are usually applying lossy image re-encoding silently — which may be fine, but is a quality decision you should make consciously, not a free lunch.
Encryption is also orthogonal to compression. Encrypting a PDF adds a small amount of overhead but does not meaningfully change how well the content compresses, because the compressed streams are encrypted as bytes. A compressed, then encrypted PDF is both smaller and protected.
In practice
What a compress tool does
When you run a PDF through acompress PDF tool, the safe, lossless steps are: re-save with object streams, drop unreferenced objects, and compact the cross-reference table. These alone often reduce size by 10–40% on documents from older exporters. Larger gains require re-encoding images, which is a separate, lossy decision the user should make consciously.
Keep reading