How PDF compression works, explained without the jargon
Updated September 23, 2026
A PDF is a container holding text, fonts, images, vector drawings and a table describing where everything is. Compression works on each of these differently, and knowing which parts can shrink safely explains why one file drops by 80 percent and another by almost nothing.
What a PDF is made of
Inside the file are objects: page descriptions, text instructions, font data, images and vector paths, plus a cross-reference table that tells a reader where each object starts. Most of these objects are stored as streams, which are blocks of data that can be compressed.
Size is not spread evenly. In a typical document the images are the bulk, fonts come second, and the text and drawing instructions are small. That imbalance decides where compression can make a difference.
Lossless and lossy compression
Lossless methods make data smaller in a way that can be reversed exactly. The common one in PDF is Flate, the same family of algorithm behind ZIP, which is used for text instructions, structure and many images. Nothing is lost, but the savings are limited when the data is already compact.
Lossy methods throw away detail that is judged unimportant and cannot be brought back. In PDF this almost always means images. Because the loss is permanent, lossy compression is where quality and size trade against each other, and it is why compressing an already-compressed file again tends to make things worse.
Images: resolution and JPEG quality
Two settings dominate image size. The first is resolution, the number of pixels per inch of the printed page. Photographs at 300 DPI suit high-quality print, while 150 DPI is usually comfortable on screen and for office printing. Downsampling reduces the pixel count, and because pixel count grows with the square of the resolution, halving the DPI cuts the raw pixels to a quarter.
The second is JPEG quality. JPEG splits an image into small blocks and stores simplified versions of them. A lower quality setting simplifies more, giving a smaller file and, eventually, visible blocky artifacts around edges and in gradients. Re-encoding a JPEG that was already saved at low quality adds a second round of loss on top of the first.
This is what Compress PDF does to the embedded JPEG images: it re-encodes them at a lower resolution and quality, according to the preset. Text and vector graphics are not re-encoded, so they stay sharp.
Fonts
PDFs embed the fonts they use so the document looks the same everywhere. Many generators embed only the characters actually used, which is called subsetting, and that keeps font data small. Files assembled from several sources can end up carrying several copies or full versions of the same family.
Fonts are more delicate than images. Removing glyphs that the text still needs breaks the display, so safe compression leaves font content mostly alone and relies on stream compression rather than removal. That is one reason a PDF full of text sometimes shrinks so little.
Structure: object streams and rewriting
Since PDF 1.5, many small objects can be grouped into an object stream and compressed together, and the cross-reference table itself can be stored compactly. Older or carelessly produced files may scatter thousands of tiny uncompressed objects, which wastes space that a rewrite recovers.
Files that were edited and saved incrementally can also keep old versions of objects that are no longer used. Rewriting the file writes only what the document still needs. This structural clean-up is lossless, which is why it helps a little even when there are no images to shrink.
Why some files barely shrink
A document that is mostly text and vector graphics was small to begin with, and its content is already stored efficiently. Images that were exported at modest resolution and quality leave little room. In those cases the honest result is a saving of a few percent, or none.
Compress PDF handles this openly: when the result is not smaller than the original, it keeps the original and tells you the file was already well optimized. Its optional convert pages to images mode can shrink some text-heavy scans further, but it replaces the text with a picture, so text becomes unselectable, and it is only offered as an explicit choice with a warning.
Compression is not the same as web optimization
Web Optimize PDF applies a different idea. It linearizes the file, also called fast web view, and compresses its structure so the first page can appear before the whole file has downloaded. It does not re-encode images, so it improves how quickly a PDF opens online, not how large its pictures are.
To see what your own file contains, open it in PDF Information. It lists page count, size, fonts and the number of embedded images, which tells you which of the ideas above will apply.
Frequently asked questions
Is PDF compression lossless or lossy?
Both, depending on the part. Rewriting the file structure and compressing text streams is lossless. Reducing image resolution and JPEG quality is lossy, so detail removed from images cannot be restored.
Why does compressing a compressed PDF again make it look worse?
Each lossy pass on an image discards detail and adds artifacts on top of the previous ones, while the size gain gets smaller. It is better to go back to the original and choose a stronger preset once.
Why is a text-only PDF hard to shrink?
Text and drawing instructions are small and already stored compactly, and embedded fonts cannot be removed without breaking the display. With no large images, there is little left to remove.
What is the difference between compressing and web optimizing a PDF?
Compressing reduces file size, mostly by re-encoding images. Web optimizing reorganizes the file so the first page shows quickly while the rest downloads, and it does not recompress images.
Tools mentioned in this guide
More guides
- How to compress a PDF, step by stepStep-by-step PDF compression in your browser: what each preset does, when to pick Maximum or High quality, and what to check before sending the result.
- Why is my PDF so big, and how do I make it smaller?Why is your PDF so large? Learn to diagnose the cause, know typical email and portal size limits, and choose the right fix from compression to splitting.