PDF compression explained: lossless vs lossy
By the PDFNU team ·
Short answer: lossless compression makes a PDF smaller without changing anything you can see, by storing the same data more efficiently. Lossy compression throws away detail you’re unlikely to notice, mostly by lowering image resolution and JPEG quality. Text-heavy PDFs barely shrink because they’re already efficient; image-heavy PDFs often shrink by 70–90% with lossy compression.
What’s inside a PDF
A PDF is a container of objects. The ones that matter for size are:
- Text and vector graphics: drawing instructions like “put these letters here in this font”. Tiny and infinitely sharp.
- Fonts: embedded so the document looks the same everywhere. Usually subset (only the characters used), but not always.
- Images: photos, scans, logos. Almost always the biggest part.
- Structure: the cross-reference table, metadata, bookmarks and form fields. Usually small, sometimes bloated.
Lossless compression
Lossless means the result is identical in content. Techniques include packing many small objects into compressed object streams, re-compressing streams with better settings, removing unused objects and duplicate images, and subsetting fonts. PDFNU’s first stage does this. It often saves 5–30% on documents exported from office apps, and almost nothing on PDFs that were already optimized.
Lossy compression
Lossy compression changes images to save space. Two settings do most of the work:
- Downsampling (resolution): a scan at 300 dpi has four times as many pixels as the same scan at 150 dpi. Halving dpi roughly quarters the image data. On a phone or laptop screen, 150 dpi is indistinguishable from 300.
- JPEG quality: JPEG discards fine detail the eye is less sensitive to. Moving from very high to medium quality often halves file size with little visible change. Pushed too far, it causes blocky “artifacts” around text edges.
PDFNU’s levels map to these settings: High Quality keeps about 220 dpi, Recommended about 150 dpi, and Smallest about 96 dpi.
Rasterizing: the last resort
When a strict size target can’t be met any other way, a page can be rasterized, meaning turned into a single image and then JPEG-compressed. This guarantees a predictable size per page, but text becomes pixels: it can no longer be selected, searched or read aloud by screen readers. PDFNU only does this for size targets, never below 72 dpi, and always warns you.
Why your PDF didn’t shrink
- It’s mostly text and vectors. There’s nothing lossy compression can remove.
- Its images were already compressed at screen resolution.
- It uses large embedded fonts, common with CJK languages, that can’t be removed without changing how the document looks.
In these cases PDFNU keeps your original file rather than giving you a bigger or worse one.
Try it
Open Compress PDF, try the three levels, and compare. Each run is local and quick, so experimenting costs nothing. For upload limits, see compress a PDF to 200KB and to 100KB.