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
- If your PDF is scans or photographs, compression works. The default took 4.58 MB down to 956 KB, and the most aggressive setting to 524 KB — -89%.
- If your PDF is mostly text, do not compress it. There is nothing for this method to squeeze, and rasterising text costs far more than storing it. Delete pages with Split PDF instead, which is usually what the size problem really needs.
- Every page becomes a picture. This is not a side effect to be tuned away. It is the method, and it is why the text disappears.
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:
| Preset | Resolution | JPEG quality |
|---|---|---|
| Low | 150 DPI | 90 |
| Recommended | 96 DPI | 75 |
| High | 72 DPI | 50 |
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.
| Preset | Result | Change | Text 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.
| Preset | Result | Change | Text 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.
| Preset | Result | Change | Text 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:
- Search. Ctrl-F finds nothing in the compressed file, in any reader.
- Selection and copying. There is no text to select, only pixels that look like text.
- Screen readers. A rasterised page is an unlabelled image. This is an accessibility regression, and the most serious item on this list.
- Links, forms, bookmarks. Gone with everything else, because the output is a new document built from pictures.
- Sharpness at any zoom. Text that was vector is now fixed at the chosen DPI.
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.
- Send fewer pages. Split PDF in range mode builds a new document from the pages that are actually needed. This is the single most effective thing, and it costs nothing in quality.
- Check what is really heavy. A report with one enormous cover image is a different problem from a report with two hundred pages, and only one of those is worth compressing.
- Compress the images before they go in, if you are building the document — at the image stage, where the text is not in the firing line.
- Reconsider the ceiling. Plenty of upload limits are per-attachment; a document split in two often gets through unchanged.
Limits of this test
- Three built documents, not a corpus. They are deterministic so the numbers can be checked, and they are chosen to sit at the extremes and the middle. Your file will land somewhere on that spectrum rather than on one of these points.
- A4 at 8 pages. Output size scales with page area and page count. A US Letter document is close; a large-format drawing is not.
- My scan pages are clean. They carry paper texture and speckle, but a real scan of a creased, coffee-marked, slightly skewed page has more fine detail and will not compress quite as well.
- Size only, not legibility. I measured bytes and extractable characters. Whether 72 DPI is still comfortable to read is a judgement this test does not make — look at the preview before you keep the result.
- One renderer and one encoder. pdf.js and Chromium’s JPEG encoder. Ghostscript and commercial tools use different methods entirely, including ones that keep the text layer, and will not produce these numbers.
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/pdfsFor 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.