I compressed a 45KB invoice PDF through an online tool and the result came back at 850KB. The tool had “compressed” it by embedding the entire Arial and Helvetica font families into the file — fonts that the original document referenced by name without embedding. The “compression” was actually a full re-export that added 800KB of font data. Understanding why this happens tells you exactly how to prevent it.
Compress PDFs without font re-embedding — locally.
Our PDF tools run in your browser. Your documents never leave your device.
Open PDF Tools →What a PDF File Contains
A PDF is not a simple image of your document. It is a structured container that holds:
- Page content streams: Drawing instructions (move to x,y; draw text; show image)
- Font resources: Either references to system fonts or embedded font data
- Image resources: Compressed image streams (JPEG, FLATE/PNG, JBIG2)
- Metadata: Document info, creation date, application name, XMP metadata
- Cross-reference table: Index mapping object numbers to byte offsets
Each of these can be a source of size inflation during compression. Here are the six most common causes, in rough order of frequency.
Cause 1: Font Embedding (The Biggest Culprit)
PDFs can reference fonts in two ways: by name (trusting the reader to have the font installed) or by embedding the complete font data in the file. A name-only reference to Arial is a few bytes. A fully embedded Arial font file is 200–500KB.
| PDF Type | Before Compression | After Re-Export with Full Font Embedding | With Font Subsetting |
|---|---|---|---|
| 1-page invoice (text only) | 45 KB | 850 KB (+1,789%) | 55 KB (+22%) |
| 5-page report (text + tables) | 120 KB | 1,200 KB (+900%) | 140 KB (+17%) |
| 20-page report (mixed) | 800 KB | 1,400 KB (+75%) | 820 KB (+2.5%) |
Font subsetting embeds only the specific characters used in the document. If your document uses 80 of Arial's 1,200 glyphs, the subset is roughly 7% the size of the full font.
Cause 2: Image Re-Encoding
A PDF containing a JPEG image stores the raw JPEG bytes directly — the image is not re-encoded when the PDF is created. When a compression tool re-exports the PDF, it may decode the JPEG and re-encode it, sometimes at a higher quality setting than the original or using a less efficient codec.
An image that was originally a 50KB JPEG at quality 75 can become a 90KB PNG if the tool converts it to FLATE/Deflate-compressed bitmap during the re-export. PNG is lossless and better at screenshots — worse at photographs.
Cause 3: The File Is Already Optimised
If a PDF was already exported with FLATE-compressed content streams, subsetted fonts, and quality-adjusted images, there is very little for a compressor to remove. Reprocessing it adds a new XREF table and metadata block without removing anything. The net result: a marginally larger file.
Check a PDF's compression state before running it through a tool. In Adobe Acrobat: File > Properties > Description (shows file size and PDF version). In Linux: pdfinfo filename.pdf shows basic metadata including whether streams are compressed.
Cause 4: Metadata Bloat
Some PDF generators embed extensive XMP metadata — RDF-formatted XML describing the document, its creation software, colour profiles, and modification history. Each save or export through a different tool appends additional metadata. Documents that have passed through multiple workflows accumulate significant metadata overhead.
# Check PDF metadata with Ghostscript (free, cross-platform) # Install: https://www.ghostscript.com/ # View metadata stream sizes gs -dBATCH -dNOPAUSE -sDEVICE=nullpage input.pdf # Strip metadata and re-optimise (produces minimal output) gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite \ -dPDFSETTINGS=/ebook \ -dCompressFonts=true \ -dSubsetFonts=true \ -sOutputFile=output.pdf input.pdf
Cause 5: Duplicate Resource Streams
PDFs that were assembled by merging multiple documents may contain the same font or image embedded multiple times — once per source document. If both a contract and a letterhead template embed Arial, and they are merged without deduplication, the merged PDF contains two copies of Arial.
Ghostscript's -dDetectDuplicateImages flag deduplicates identical image streams. Font deduplication requires a different approach — regenerating the PDF through a tool that rebuilds the resource index.
Cause 6: Incremental Update Accumulation
When a PDF is edited and re-saved without full rewrite, the PDF format allows “incremental updates” — the new content is appended to the end of the file rather than replacing the old content. Old objects remain in the file; the XREF table just redirects to the new versions.
A PDF edited five times without a full rewrite contains five versions of every changed object. Saving with “linearised” or “save as” (rather than “save”) forces a full rewrite that removes incremental update overhead.
Diagnosing the Cause for Your Specific PDF
# Install qpdf (cross-platform PDF analysis tool)
# https://github.com/qpdf/qpdf
# Analyse a PDF's object structure
qpdf --check input.pdf
# List all embedded font streams and their sizes
qpdf --json input.pdf | python3 -c "
import json, sys
data = json.load(sys.stdin)
objects = data['objects']
for key, obj in objects.items():
if isinstance(obj, dict) and obj.get('/Type') == '/Font':
print(f'Font: {obj.get("/BaseFont")}, Subset: {"/FontDescriptor" in obj}')
"
# Decompress all streams to inspect content
qpdf --qdf --object-streams=disable input.pdf decompressed.pdf
# Now inspect decompressed.pdf in a text editor to see raw PDF objectsThe Ghostscript Fix for Most Cases
For the majority of “PDF got bigger” cases, Ghostscript's pdfwritedevice with correct settings is the right solution:
# Ghostscript: the most reliable PDF size reducer # Settings explained: # /ebook = 150dpi images (good balance of size and quality) # /screen = 72dpi images (smallest files, screen-only quality) # /prepress = 300dpi with full font embedding (for printing) gs \ -dBATCH \ -dNOPAUSE \ -sDEVICE=pdfwrite \ -dPDFSETTINGS=/ebook \ -dCompressFonts=true \ -dSubsetFonts=true \ -dDetectDuplicateImages=true \ -dDownsampleColorImages=true \ -dColorImageResolution=150 \ -sOutputFile=output-smaller.pdf \ input.pdf # Check the result wc -c input.pdf output-smaller.pdf
How to Pick the Right Fix
| Symptom | Likely Cause | Fix |
|---|---|---|
| Text-only PDF jumped 10Ă— in size | Full font embedding (not subsetting) | Ghostscript with -dSubsetFonts=true |
| Image-heavy PDF barely changed | Already optimised image streams | Reduce image DPI with -dColorImageResolution=100 |
| Merged PDF is unusually large | Duplicate font resources from source files | Re-export merged PDF through Ghostscript with -dDetectDuplicateImages |
| Edited PDF keeps growing with each save | Incremental update accumulation | Use “Save As” (not “Save”) to force full rewrite |
If the bloat is coming from images inside the PDF, understanding image compression at a lower level helps. Our image compression guide covers lossy quality settings and which formats to use for which image types. For merging PDFs without triggering the font re-embedding problem, our PDF merging guide shows how pdf-lib copies pages at the object level without re-encoding fonts or images.
Process PDFs locally — local processing.
Merge, split, and manage PDFs in your browser. Your documents stay on your device.
Open PDF Tools →