Measured 17 September 2026

What PDF compression actually does to your file

I ran this site’s own PDF compressor — the shipped code, unmodified — across its three presets against three 8-page documents. On a scan it did what it promises: -79% at the default setting. On a text-only PDF every setting made the filebigger, the mildest by 26 times. And every output, on every document, went from selectable text to none at all.

The short answer

What the compressor does

It renders each page to a canvas at a chosen resolution, encodes that canvas as a JPEG, and assembles the JPEGs into a new PDF at the original page size. That is the whole algorithm. The three presets are just a DPI and a JPEG quality:

The three presets, as the tool defines them
PresetResolutionJPEG quality
Low150 DPI90
Recommended96 DPI75
High72 DPI50

Because every page is redrawn as an image, the size of the result depends on the page dimensions and the DPI, and barely at all on what the original file weighed. That is the single fact that explains every number below, including the strange ones.

The measurements

Scanned document — 4.58 MB

Eight pages, each a separate 200 DPI page image, the way a scanner or a phone scanning app produces them. No selectable text to begin with.

8 pages. Text before: 0 characters extractable by pdf.js.
PresetResultChangeText after
Low (150 DPI, q90)3.44 MB-25%0 characters
Recommended (96 DPI, q75)956 KB-79%0 characters
High (72 DPI, q50)524 KB-89%0 characters

Report with figures — 2.29 MB

Alternating pages of real text and full-width photographs — the shape of most reports, proposals and slide exports.

8 pages. Text before: 8,666 characters extractable by pdf.js.
PresetResultChangeText after
Low (150 DPI, q90)2.07 MB-10%0 characters
Recommended (96 DPI, q75)715 KB-69%0 characters
High (72 DPI, q50)330 KB-86%0 characters

Text-only report — 15 KB

Eight pages of text in embedded standard fonts, no images at all. The case this tool cannot help with.

8 pages. Text before: 17,263 characters extractable by pdf.js.
PresetResultChangeText after
Low (150 DPI, q90)2.41 MB+15,782%0 characters
Recommended (96 DPI, q75)916 KB+5,945%0 characters
High (72 DPI, q50)391 KB+2,480%0 characters

The text does not survive. At all.

The report with figures went in with 8,666 extractable characters and came out with zero, at every preset. The text-only report went from 17,263 to zero. That is not a degradation to weigh up; it is total, and it is what rasterising means.

What you lose with it, in practice:

If any of that matters, keep the original. Compress a copy to send, and keep the real file for yourself.

Why compressing a text PDF makes it enormous

This is the result worth understanding, because the intuition is exactly backwards. The text-only report is 15 KB — 8 pages of text stored as text, which is about as compact as a document gets. Compressing it produced 916 KB at the default preset and 2.41 MB at the gentlest one: 159 times the original.

Nothing has gone wrong. A page of text is a few hundred bytes of characters plus a font the whole document shares. The same page as a 150 DPI image is roughly 1,200 by 1,750 pixels of black marks on white that JPEG is poorly suited to — it was designed for photographs, and sharp high-contrast edges are its worst case. The tool faithfully turned a very efficient representation into a very inefficient one.

You would not actually receive that file. The compressor refuses any result that is not smaller than the input — validateOutput returns “The processed PDF is not smaller than the original” and the output is discarded. So all nine text-report results above are what the algorithm produced, not what a user gets. The number is worth publishing anyway, because it explains why that guard exists and why no setting will rescue a text PDF.

What to do instead when a text PDF is too big

A text PDF that is genuinely too large is almost never too large because of the text. It is usually page count, an embedded font set, or a few heavy images among the pages.

Limits of this test

Repeat it yourself

Both scripts are in this site’s repository. The second bundles src/lib/pdf/compress.ts — the shipped compressor, unmodified — and runs it in a headless browser, because pdf.js and canvas are where the work actually happens:

node scripts/make-pdf-test-documents.mjs tmp/pdfs
node scripts/measure-pdf-compression.mjs tmp/pdfs

For your own file, the compressor shows you the before and after sizes before you download anything, and like everything here it runs in your browser. Whether that last claim is true of a given tool is the subject of the PDF tool study.