What actually makes PDF compression good? Six measurable metrics
Smaller is meaningless without knowing what it cost. Here is the scorecard we hold our own compressor to, measurements included.
Every compressor advertises a percentage. None of them tells you what the percentage cost. This page defines six metrics that together actually describe compression quality, then measures MarqPDF and the stock Ghostscript 10.00.0 presets most free tools wrap against all six, on four real documents, on 2026-08-25. The corpus and runner are public, so every number regenerates from scratch.
The six metrics
- Size — output as a share of the original. Necessary, nowhere near sufficient.
- Visual fidelity — PSNR of the rendered pages against the original. This is what the size traded away; 60 dB means visually identical.
- Text integrity — share of extractable characters that survive. A compressor that rasterises your text 'wins' on size and destroys the document.
- Target accuracy — when you need 'under 500 KB' for an upload form, how much of that budget is used, and is the answer actually under it.
- No inflation — a compressor must never return a bigger file than it was given.
- Validity — the output still parses and renders everywhere.
Size only counts at matched fidelity
The dB figures under each group are measured, not assumed: on Paper B both engines' outputs render at the same 49.8 dB, yet one is 210 KB and the other 1,326 KB — six times smaller at identical measured fidelity. On the invoice, stock Ghostscript inflates the file; MarqPDF returns it untouched (2 of 4 documents inflated by the stock presets, 0 by MarqPDF).
Target accuracy, with its cost shown
Five of six targets land under budget. The miss is real and stays on the chart: 200 KB from a six-page 200 dpi scan is not reachable without destroying it, so MarqPDF returns its best 260 KB and says so. The fidelity cost of aggressive targets is measured too: the scan at its screen preset is 21.1 dB, and pushing to 260 KB costs a further 2.9 dB — a trade you can now see before you make it.
Text integrity and validity
Every output on this page still parses and renders, and text layers survive: 96–100% of extractable characters retained across all runs (the papers lose a few percent to ligature re-encoding in both engines; the table shows exact figures). Nothing was rasterised.
Speed, honestly labelled
Timings in the table are wall-clock in each engine's own environment — MarqPDF end-to-end through the live API including upload, Ghostscript locally in a container — so they describe what a user experiences, not a same-hardware race. The slowest number on the page is the scan's 13 s target run, which is the quality ladder trying multiple rungs before choosing.
Full scorecard
| Document | gs 10.00.0 ebook | MarqPDF ebook | MarqPDF screen | Target 500 KB | Target 200 KB |
|---|---|---|---|---|---|
| Invoice (3 KB) 3 KB original | 4 KB 60.0 dB · text 100% · renders · 0.0s | 3 KB 60.0 dB · text 100% · renders · 0.9s | 3 KB 60.0 dB · text 100% · renders · 0.7s | 3 KB 60.0 dB · text 100% · renders · 0.7s | 3 KB 60.0 dB · text 100% · renders · 0.4s |
| Paper A (800 KB) 800 KB original | 257 KB 35.2 dB · text 100% · renders · 0.2s | 198 KB 35.2 dB · text 100% · renders · 1.1s | 198 KB 35.2 dB · text 100% · renders · 1.0s | 199 KB 35.2 dB · text 100% · renders · 1.9s | 199 KB 35.2 dB · text 100% · renders · 2.1s |
| Paper B (2.2 MB) 2,163 KB original | 1,326 KB 49.8 dB · text 100% · renders · 0.5s | 210 KB 49.8 dB · text 96% · renders · 1.3s | 171 KB 49.8 dB · text 96% · renders · 1.4s | 387 KB 48.7 dB · text 96% · renders · 4.0s | 182 KB 49.8 dB · text 96% · renders · 4.4s |
| Scan (3.3 MB) 3,316 KB original | 3,318 KB 60.0 dB · text 100% · renders · 0.1s | 3,316 KB 60.0 dB · text 100% · renders · 2.7s | 615 KB 21.1 dB · text 100% · renders · 2.4s | 260 KB 18.2 dB · text 100% · renders · 13.3s | 260 KB 18.2 dB · text 100% · renders · 13.0s |
Frequently asked questions
Why PSNR and not just eyeballing?
PSNR is computed from the rendered pages, so it is reproducible and can't be argued with a nicer screenshot. 60 dB means byte- or pixel-identical; the scan numbers show exactly what aggressive targets cost.
Why is stock Ghostscript the comparison?
Because it is the engine most free compressors wrap, it is public and versioned, and anyone can rerun the comparison. Closed SaaS engines can't be benchmarked honestly, so we don't publish numbers for them.
Were the documents picked to flatter the result?
The corpus was fixed before any measurement, includes a file where our preset does nothing (the ebook preset leaves the scan untouched), and the one missed target is printed on the chart.