How to actually reduce PDF file size (and what makes PDFs huge)

To shrink a PDF effectively, you first need to know what is inflating it. In the overwhelming majority of oversized PDFs the answer is page images — but fonts, duplicated resources, and sloppy structure all play a role, and each one calls for a different fix. Here is how PDF file size actually works, and how to pick the right tool for your document.

What dominates PDF file size

1. Page images (scans and photos)

A scanned document is not text at all: each page is one large raster image with a thin PDF wrapper around it. A color scan at 300 dpi of a US Letter page is roughly 2550×3300 pixels — about 8.4 million pixels — and depending on the codec and quality setting that can easily mean 1–5 MB per page. Multiply by a 40-page scan and you have a file nobody can email.

The codec matters as much as the resolution. PDF supports several image compression filters, each suited to a different kind of content:

  • JPEG (DCTDecode) — the workhorse for photos and color scans. Lossy; quality settings trade artifacts for size.
  • JBIG2 — designed for black-and-white scanned text. It recognizes repeated shapes (the same letter "e" appearing hundreds of times) and stores each shape once, which is why a JBIG2 bilevel scan can be 5–10× smaller than the same page as CCITT.
  • CCITT Group 4 — the older fax-era codec for bilevel images. Reliable and universally supported, but less efficient than JBIG2.
  • Flate (zlib) — lossless, used for screenshots, diagrams, and anything with hard edges where JPEG artifacts would be visible.

A scanning pipeline that stores black-and-white pages as full-color JPEG — which cheap scanner defaults often do — can produce files 20× larger than necessary for the same legibility.

2. Embedded font programs

A born-digital PDF (exported from Word, InDesign, LaTeX) embeds the actual font files it uses so the document renders identically everywhere. A subsetted Latin font typically adds tens of kilobytes; a full CJK font can add several megabytes on its own. When a document embeds many full (non-subsetted) fonts, they can dominate the file even though the text itself compresses to almost nothing.

3. Duplicate resources

PDFs assembled from multiple sources — merged files, mail merges, letterhead overlays — frequently embed the same image or font once per source document instead of once per file. A 100-page mail merge that embeds the same 200 KB logo on every page carries 20 MB of pure redundancy. Good optimizers detect identical objects and keep a single copy.

4. Uncompressed structure

The PDF format stores its internal skeleton — the cross-reference table and thousands of small dictionary objects — and since PDF 1.5 these can be packed into compressed object streams. Files written by older or lazy generators leave this structure uncompressed. On image-heavy files the saving is marginal, but on long text documents with complex structure, rewriting with object streams can trim a meaningful slice at zero quality cost. Our Web optimize PDF tool does exactly this kind of lossless re-save.

Diagnosing before compressing

A quick way to tell which case you have: try selecting text in the document. If you cannot select anything, you are looking at a scan and images are the whole story. If text selects normally but the file is still large, divide file size by page count — a born-digital text page should cost a few tens of kilobytes, so a text document averaging 500 KB per page is carrying heavy images, unsubsetted fonts, or duplicated resources. Desktop tools such as Adobe Acrobat Pro's space audit, or the command-line qpdf --show-npages and pdfimages -list from Poppler, will itemize exactly what is inside.

Why "compress PDF" tools give such different results

Every tool with "compress" on the label is doing one of three very different things:

  1. Lossless structure optimization. Rewrite the file: deduplicate objects, compress object streams, drop unused resources, subset fonts. Text stays selectable, images untouched. Typical saving: anywhere from 2% to 50%+ depending on how wasteful the original generator was.
  2. Image downsampling and recompression. Keep the PDF's structure but re-encode its images at lower resolution and/or quality. This is where the big wins on scans come from, and it is what Ghostscript's preset profiles do. Text objects remain real text.
  3. Full rasterization. Render every page to a bitmap and rebuild the PDF from those bitmaps. This is the bluntest instrument: it guarantees a predictable size and flattens every complexity, but it destroys text selectability, searchability, and accessibility. Our own Compress PDF tool works this way, because rendering and re-encoding is what a browser can do reliably without a server — and we say so on the tool page rather than hiding it. Use it for scans and image-heavy decks; do not use it on documents where you need the text layer to survive.

Decision guide by document type

Color scan, 300 dpi (1–5 MB/page)
Downsample to 150 dpi and re-encode as JPEG around quality 70. Halving the resolution alone cuts pixel count 4×; combined with grayscale conversion and moderate JPEG quality, a ~10× reduction with perfectly readable output is a realistic expectation for typical office documents. If you are scanning fresh, it is even better to scan at the right settings in the first place — or photograph pages and build the file yourself with Images to PDF, choosing the size/quality tradeoff up front.
Black-and-white text scan
The right answer is bilevel encoding (JBIG2 or CCITT G4) at 300 dpi, which lands around 20–60 KB per page. If your tool cannot produce bilevel output, 150–200 dpi grayscale JPEG is the fallback.
Born-digital report with photos
Downsample only the images (150 dpi is fine for screen reading, 200–300 dpi if it will be printed) and leave text and fonts alone. Avoid rasterizing tools here — you would trade a small size win for the loss of the entire text layer.
Text-only document that is still large
Suspect fonts and structure. Lossless optimization with font subsetting is the fix; there is nothing to downsample.
Merged or mail-merged file
Suspect duplicate resources. A lossless optimize pass that deduplicates objects can collapse these dramatically with zero visual change.

The Ghostscript one-liner

If you have Ghostscript installed, this is the standard command for the downsample-and-recompress approach:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/ebook \
   -dNOPAUSE -dQUIET -dBATCH -sOutputFile=smaller.pdf input.pdf

/ebook targets 150 dpi images; /screen is more aggressive (72 dpi) and /printer more conservative (300 dpi). It keeps the text layer intact, which makes it a good desktop complement to browser-based tools.

When not to compress

Some documents should be left alone:

  • Signed contracts and legal filings. Recompression rewrites the file, which invalidates digital signatures and can raise questions about whether the document is the one that was executed. Send the original.
  • Archival documents and PDF/A. PDF/A compliance depends on specific internal properties; casual recompression will usually break conformance. If long-term preservation is the goal, size is the wrong thing to optimize.
  • Anything you may need to re-edit or extract from. Once rasterized, tables, text, and vector art are gone for good. Keep the original file alongside any compressed copy.

One last note: if your goal in shrinking a file is to share it, remember that PDFs also carry metadata — author names, creation tools, sometimes editing history. Before sending a document outside your organization, consider running it through Remove PDF metadata as well.

Summary

Diagnose first: scans call for downsampling or bilevel re-encoding, born-digital files call for lossless optimization and font subsetting, merged files call for deduplication. Match the tool to the problem, know whether your tool preserves the text layer, and keep originals for anything signed or archival.