File Maktab
FILE MAKTAB RESEARCH

PDF Compression Benchmark

How much do different types of PDFs actually shrink when compressed? We built twelve deterministic synthetic documents across six document categories, ran each one through File Maktab's real browser compression engine at all three compression presets, and published every measured byte below — no estimates, no rounded-up marketing numbers.

Measured 2026-09-03 · Chrome/151.0.7922.173 · Two consecutive full runs produced byte-identical results for every sample and preset.

91.2%average size reduction for image-heavy PDFs at the recommended preset
75.7%average reduction for scanned documents at the recommended preset
0%reduction for text-heavy PDFs — they contain no images to re-encode

Methodology

File Maktab's compression engine walks every page of a PDF, finds the embedded JPEG images, and re-encodes them at the quality and maximum dimension of the chosen preset. Text, vector graphics, and document structure are not touched; the file is then re-saved with compressed object streams. Because the engine's only lever is the embedded images, the benchmark is designed around document types whose image content differs.

Each of the twelve samples was generated deterministically (seeded random content, fixed PDF metadata timestamps), then compressed once per preset. Every measurement ran twice; both runs produced byte-identical results, so each published number is a single exact measurement rather than an average. The benchmark clock is pinned during compression because the PDF writer stamps a modification date into the file metadata — a difference of a few bytes that has nothing to do with compression.

Size reduction is defined exactly as: reduction % = (original size − compressed size) ÷ original size × 100. Sizes below are shown in KB or MB for readability; the underlying measurements are exact bytes.

The three presets are the ones the production tool exposes:

Compression presets measured
PresetJPEG qualityMax image dimension
Strong compression0.42900 px
Recommended0.551400 px
High quality0.782200 px

Dataset

Twelve synthetic documents in six categories, two per category. Every file was purpose-built for this benchmark — no user files, no customer data, no third-party documents. Photo-like images are gradient-and-grain JPEG fields; scanned pages are synthetic images with text-line strips and scanner-like noise; text and table documents contain only text and vector lines.

Benchmark samples and their characteristics
SampleCategoryPagesEmbedded JPEGsOriginal size
Text report (24 pages)Text-heavy document24042 KB
Text report (60 pages)Text-heavy document600104 KB
Photo document (6 images)Image-heavy document668.88 MB
Photo document (12 images)Image-heavy document121217.76 MB
Scanned document (10 pages)Scanned document10103.75 MB
Scanned document (20 pages)Scanned document20207.51 MB
Mixed report (12 pages)Mixed text + images1265.52 MB
Mixed report, larger images (12 pages)Mixed text + images12611.46 MB
Presentation (16 slides)Presentation / slides1642.93 MB
Presentation (30 slides)Presentation / slides3085.85 MB
Spreadsheet export (20 pages)Spreadsheet / table-heavy20041 KB
Spreadsheet export (40 pages)Spreadsheet / table-heavy40081 KB

Results

Compressed size and size reduction for every sample at every preset. Images re-encoded equals the number of embedded JPEGs the engine rewrote; for text and table documents the engine correctly found nothing to compress.

Measured compression results per sample and preset
SampleOriginalStrongRecommendedHigh quality
Text report (24 pages)42 KB42 KB (−0%)42 KB (−0%)42 KB (−0%)
Text report (60 pages)104 KB104 KB (−0%)104 KB (−0%)104 KB (−0%)
Photo document (6 images)8.88 MB262 KB (−97.1%)801 KB (−91.2%)5.19 MB (−41.6%)
Photo document (12 images)17.76 MB521 KB (−97.1%)1.56 MB (−91.2%)10.37 MB (−41.6%)
Scanned document (10 pages)3.75 MB437 KB (−88.6%)934 KB (−75.7%)3.40 MB (−9.4%)
Scanned document (20 pages)7.51 MB876 KB (−88.6%)1.83 MB (−75.7%)6.81 MB (−9.4%)
Mixed report (12 pages)5.52 MB207 KB (−96.3%)840 KB (−85.1%)3.19 MB (−42.2%)
Mixed report, larger images (12 pages)11.46 MB276 KB (−97.6%)802 KB (−93.2%)4.03 MB (−64.8%)
Presentation (16 slides)2.93 MB185 KB (−93.8%)581 KB (−80.7%)1.70 MB (−42%)
Presentation (30 slides)5.85 MB365 KB (−93.9%)1.12 MB (−80.8%)3.38 MB (−42.3%)
Spreadsheet export (20 pages)41 KB41 KB (−0%)41 KB (−0%)41 KB (−0%)
Spreadsheet export (40 pages)81 KB81 KB (−0%)81 KB (−0%)81 KB (−0%)
Aggregate results by document category
CategorySamplesAverage reduction (recommended preset)Observed range across presets
Text-heavy document20%0% to 0%
Image-heavy document291.2%41.6% to 97.1%
Scanned document275.7%9.4% to 88.6%
Mixed text + images289.2%42.2% to 97.6%
Presentation / slides280.8%42% to 93.9%
Spreadsheet / table-heavy20%0% to 0%

What the results mean

Within this benchmark dataset:

  • Image content decides almost everything. The two text-only categories — dense reports and spreadsheet tables — measured 0% reduction at every preset, because the engine found zero embedded images to re-encode.
  • Image-heavy documents compress the most: an average of 91.2% at the recommended preset and 97.1% at strong compression. Most of that gain comes from downscaling large embedded photos to the preset's maximum dimension, not from quality loss alone.
  • Scanned documents behave like image documents, because a scan is an image. They averaged 75.7% at the recommended preset — but notice the high-quality preset only reached 9.4%: our synthetic scans (1240 px wide) already sit under that preset's 2200 px dimension cap, so only the lighter re-encode applied.
  • Mixed documents land in between, tracking how much of the file is images: 85.1% to 93.2% at the recommended preset depending on image size.
  • The preset choice is a genuine trade-off, not a formality: on the 12-image photo document the measured spread between strong and high quality is 533 KB versus 10.87 MB from the same 18.62 MB original.

Compression for email

The most common reason to compress a PDF is an email attachment limit. Gmail and Outlook.com both publish a 25 MB per-message attachment limit, and many corporate gateways are stricter — check the limit of the service you actually send through.

Read against the measured table: our 18.62 MB photo document fits under 25 MB before compression, but at the recommended preset it becomes 1.63 MB — trivially attachable, with room to spare for the rest of the message. The 3.93 MB scanned document becomes 0.96 MB. The text reports were never a problem at all: at 43 KB and 107 KB they were already far below any limit, which is exactly why compression returned 0%.

The benchmark also shows when compression is the wrong tool: a document that is already small gains nothing, and a document that stays too large after compression needs a different answer — splitting it, or sending a download link instead of an attachment. For the full workflow, read how to compress a PDF for email.

Limitations

  • The dataset is synthetic. Photo-like images are gradient-and-grain fields, not real photographs; real camera photos contain different detail patterns and will measure somewhat differently.
  • Twelve samples in six categories illustrate how document structure drives compression; they are not a statistical model of all PDFs.
  • Real-world text PDFs usually embed fonts and are larger than our font-free text samples, but they still contain no compressible images, so the 0% finding generalizes even if the byte counts do not.
  • Measurements come from one engine — File Maktab's browser compression engine in Chrome/151.0.7922.173. JPEG encoding is implemented by the browser, so other browsers and versions may produce slightly different bytes. No competitor tools were measured.
  • Visual quality was not scored. What the engine does to images is stated exactly — JPEG quality 0.42/0.55/0.78 and maximum dimensions of 900/1400/2200 px — so the quality trade-off is defined by those parameters rather than by a subjective rating.
  • PDF metadata timestamps were pinned during measurement for reproducibility; metadata accounts for a few bytes either way.

Reproduce this benchmark

Everything on this page is reproducible. The dataset generator and measurement harness live in the File Maktab repository at benchmark/browser-entry.ts and benchmark/run.mjs. Running node benchmark/run.mjs regenerates the twelve samples deterministically, runs the production compression engine (client/src/lib/pdfCompressionEngine.ts) against every sample and preset twice inside headless Chromium, verifies the two runs are byte-identical, and writes the measured dataset to shared/pdfCompressionBenchmark.ts — the same data file this page renders. No user files are involved at any step.

Measured with synthetic documents only — this benchmark never touches user files. Engine: File Maktab browser compression engine, Chrome/151.0.7922.173, 2026-09-03.