marksmayo/Blazepdf

Benchmark-driven Rust PDF reader, CLI and desktop viewport with reproducible per-workload performance comparisons

Rust

0

1 commits

updated Oct 2, 2026

See the code

See what people are saying

README

BlazePDF

A benchmark-driven Rust PDF reader core, CLI, and lightweight desktop viewport. Classification, first-page text, native rendering, and full Markdown extraction are separate cost tiers: opening a document need not pay for every capability at once.

Latest snapshot: 40 gold medals across 40 benchmark cards. Eight documents × five workloads, with nine measured samples per BlazePDF card and one excluded warmup. This describes this corpus and machine—not every PDF, feature set, or computer.

Capabilities

  • Classification and page count without building Markdown.
  • First-page text layers with rotation information and bounded interactive caching.
  • Image/ambiguous-page routing to raster without blocking first paint on OCR.
  • First-page rendering at 150 DPI through a separately supplied PDFium runtime.
  • Structured Markdown extraction and a minimal egui desktop viewport.

The signature marker is routing metadata, not cryptographic signature validation. BlazePDF is experimental, not a feature-equivalent replacement for commercial editors. Output-equality checks compare before/after BlazePDF builds; the benchmark does not establish identical rendering quality across different products.

Build and run

Measured environment: Windows 11, Intel Core i7-12700H (20 logical CPUs), 31.7 GB RAM, Rust 1.98.0, Python 3.13.2, release builds. The benchmark harness uses Windows-specific executables/window detection; other platforms were not measured in this snapshot.

Install Rust and the MSVC C++ build tools on Windows, then:

git clone https://github.com/marksmayo/blazepdf.git
cd blazepdf
cargo build --release --locked

For the library and CLI without the GUI feature:

cargo build --release --locked --no-default-features --bin blazepdf
.\target\release\blazepdf.exe --inspect document.pdf
.\target\release\blazepdf.exe --first-page document.pdf
.\target\release\blazepdf.exe document.pdf
.\target\release\blazepdf.exe --render document.pdf page.ppm
.\target\release\blazepdf-window.exe document.pdf

Native rendering and viewport raster fallback require a compatible PDFium library. Set PDFIUM_LIB_PATH to its library path if automatic discovery cannot find it. PDFium and other vendors' installers are not bundled.

Benchmark methodology and limitations

BlazePDF's latest measurements are from 2 October 2026 (NZDT). Competitor rows retain the 30 September 2026 reference. This is a mixed-date snapshot, not a fresh simultaneous rerun of every competitor. Other applications were running during development, and launch timings vary. Competitors have five or six samples per successful row; BlazePDF has nine. All retained samples are in the raw JSON.

Only identical document/workload pairs are compared. Classification, first-page text, Markdown extraction, 150-DPI rendering and launch-to-visible-window stay separate. Missing/failed measurements are not zero or losses. BlazePDF's matrix uses one complete run, not a collection of historical per-card bests.

The following scores and timings are generated directly from canonical evidence.

Medal / score table

Source: benchmark-20261002T072651Z-merged.json. 40 document/workload cards.

Score is average rank over successfully measured cards (lower is better), not an average of incompatible latencies. Missing cards are ignored: read score alongside coverage. Ties share ranks (1, 1, 3).

ProductGoldSilverBronzeOther placementsCoverageScore ↓
BlazePDF4000040 / 401.00
MuPDF0305540 / 402.45
PDF24 Reader01708 / 402.88
pdf-inspector088723 / 403.04
PDF24 bundled qpdf00268 / 404.38
SumatraPDF0191424 / 404.54
Google Chrome PDF viewer00088 / 404.62
Okular00066 / 404.67
CalyPdf0012324 / 404.96
Foxit PDF Reader00088 / 406.00
Sejda PDF Desktop00088 / 406.62
Xodo PDF Reader00088 / 408.75

Catalogued but not measured/scored: Adobe Acrobat Reader.

Timing comparisons

Median milliseconds, including the declared adapter's launch cost. Reference is the fastest measured non-BlazePDF product for the same document/workload. Gap = reference − BlazePDF; ratio = reference / BlazePDF. Positive gaps and ratios above 1 favor BlazePDF.

Full timing tables for every measured product.

classify + extract markdown

DocumentBlazePDF (ms)Fastest referenceReference (ms)Gap (ms)Ratio
Financial table22.112MuPDF28.259+6.1471.28×
Image document270.299MuPDF298.699+28.4001.11×
Multi-column26.242pdf-inspector69.790+43.5482.66×
Overlapping text18.367MuPDF80.300+61.9334.37×
RTL Hebrew16.577pdf-inspector34.018+17.4412.05×
Rotation16.893MuPDF35.139+18.2462.08×
Signed PDF20.909MuPDF46.613+25.7042.23×
Text-heavy31.393MuPDF38.074+6.6811.21×

classify only

DocumentBlazePDF (ms)Fastest referenceReference (ms)Gap (ms)Ratio
Financial table12.381pdf-inspector22.855+10.4741.85×
Image document21.419MuPDF23.506+2.0871.10×
Multi-column14.033MuPDF20.671+6.6381.47×
Overlapping text18.301MuPDF24.308+6.0071.33×
RTL Hebrew14.543pdf-inspector27.489+12.9461.89×
Rotation13.050MuPDF21.672+8.6221.66×
Signed PDF16.811MuPDF29.015+12.2041.73×
Text-heavy13.455MuPDF14.389+0.9341.07×

launch to visible document window

DocumentBlazePDF (ms)Fastest referenceReference (ms)Gap (ms)Ratio
Financial table20.593MuPDF115.028+94.4355.59×
Image document20.455PDF24 Reader372.615+352.16018.22×
Multi-column20.254MuPDF90.327+70.0734.46×
Overlapping text20.287MuPDF128.300+108.0136.32×
RTL Hebrew21.606MuPDF44.140+22.5342.04×
Rotation20.355MuPDF72.137+51.7823.54×
Signed PDF20.033MuPDF72.812+52.7793.63×
Text-heavy19.940MuPDF67.089+47.1493.36×

open document + first-page text layer

DocumentBlazePDF (ms)Fastest referenceReference (ms)Gap (ms)Ratio
Financial table16.066pdf-inspector40.013+23.9472.49×
Image document190.402SumatraPDF259.716+69.3141.36×
Multi-column16.149pdf-inspector23.606+7.4571.46×
Overlapping text19.844pdf-inspector47.337+27.4932.39×
RTL Hebrew13.055MuPDF25.190+12.1351.93×
Rotation12.890pdf-inspector39.541+26.6513.07×
Signed PDF17.627MuPDF39.021+21.3942.21×
Text-heavy24.715MuPDF56.882+32.1672.30×

render first page at 150 DPI

DocumentBlazePDF (ms)Fastest referenceReference (ms)Gap (ms)Ratio
Financial table43.791MuPDF107.538+63.7472.46×
Image document634.231MuPDF2504.587+1870.3563.95×
Multi-column32.257MuPDF143.759+111.5024.46×
Overlapping text126.200MuPDF300.778+174.5782.38×
RTL Hebrew30.395MuPDF72.218+41.8232.38×
Rotation35.906MuPDF154.254+118.3484.30×
Signed PDF35.599MuPDF131.809+96.2103.70×
Text-heavy46.059MuPDF143.413+97.3543.11×

Reports and evidence

GitHub displays HTML source rather than executing these reports. Download either HTML file and open it locally for the interactive view; Markdown tables work on GitHub.

Reproduce the corpus, tests and benchmarks

Third-party PDFs are not redistributed. Download the eight commit-pinned corpus files and verify their hashes before running acceptance tests or benchmarks:

python scripts/bootstrap_benchmark_corpus.py
python scripts/bootstrap_benchmark_corpus.py --check
cargo test --no-default-features --bin blazepdf --test reader_acceptance
cargo test --no-default-features --test inspection_allocation_budget --test extraction_allocation_budget
python scripts/test_workload_graphs.py
python scripts/test_update_canonical_reports.py
python scripts/test_readme_benchmarks.py
python scripts/update_readme_benchmarks.py --check

Our modified pdf-inspector is preserved as ordinary source: no submodule setup is required. The eight-file bootstrap supplies the top-level acceptance suite. Its larger internal regression suite needs additional upstream fixtures not provisioned by this bootstrap.

With PDFium configured, rerun the full five-workload BlazePDF matrix:

python scripts/benchmark.py --reader blazepdf-first-page --reader blazepdf-inspect --reader blazepdf-render --reader blazepdf --reader blazepdf-window --repeats 9 --no-canonical

To compare the whole new run with the retained reference, replace <new-run> with its timestamped filename:

python scripts/merge_benchmark_runs.py results/benchmark-20260930T040051Z-merged.json results/<new-run>.json results/<new-run>-merged.json
python scripts/update_canonical_reports.py
python scripts/update_readme_benchmarks.py

For a fresh all-product comparison, install/configure the readers in benchmarks/readers.json, then run python scripts/benchmark.py. Executable paths in that manifest describe the original machine: update them for your installation. Missing installations are recorded as skipped. Other vendors' software is not bundled.

Layout

PathPurpose
src/Reader core, CLI and viewport
crates/pdf-inspector/Modified PDF core and bundled CMaps
tests/Acceptance and allocation regression gates
benchmarks/Corpus, pinned fixture sources and reader/product configuration
scripts/Benchmarks, comparisons and report/documentation generation
results/Published final raw evidence and standalone reports
docs/benchmark-timings.mdTimings for every measured product

License and attribution

BlazePDF's own code is MIT licensed. The Firecrawl PDF core, Adobe CMaps, downloaded documents and runtime dependencies retain their notices and terms. See NOTICE.md for source provenance and attribution.

marksmayo/Blazepdf

Benchmark-driven Rust PDF reader, CLI and desktop viewport with reproducible per-workload performance comparisons

Rust

0

1 commits

updated Oct 2, 2026

See the code

See what people are saying

README

BlazePDF

A benchmark-driven Rust PDF reader core, CLI, and lightweight desktop viewport. Classification, first-page text, native rendering, and full Markdown extraction are separate cost tiers: opening a document need not pay for every capability at once.

Latest snapshot: 40 gold medals across 40 benchmark cards. Eight documents × five workloads, with nine measured samples per BlazePDF card and one excluded warmup. This describes this corpus and machine—not every PDF, feature set, or computer.

Capabilities

  • Classification and page count without building Markdown.
  • First-page text layers with rotation information and bounded interactive caching.
  • Image/ambiguous-page routing to raster without blocking first paint on OCR.
  • First-page rendering at 150 DPI through a separately supplied PDFium runtime.
  • Structured Markdown extraction and a minimal egui desktop viewport.

The signature marker is routing metadata, not cryptographic signature validation. BlazePDF is experimental, not a feature-equivalent replacement for commercial editors. Output-equality checks compare before/after BlazePDF builds; the benchmark does not establish identical rendering quality across different products.

Build and run

Measured environment: Windows 11, Intel Core i7-12700H (20 logical CPUs), 31.7 GB RAM, Rust 1.98.0, Python 3.13.2, release builds. The benchmark harness uses Windows-specific executables/window detection; other platforms were not measured in this snapshot.

Install Rust and the MSVC C++ build tools on Windows, then:

git clone https://github.com/marksmayo/blazepdf.git
cd blazepdf
cargo build --release --locked

For the library and CLI without the GUI feature:

cargo build --release --locked --no-default-features --bin blazepdf
.\target\release\blazepdf.exe --inspect document.pdf
.\target\release\blazepdf.exe --first-page document.pdf
.\target\release\blazepdf.exe document.pdf
.\target\release\blazepdf.exe --render document.pdf page.ppm
.\target\release\blazepdf-window.exe document.pdf

Native rendering and viewport raster fallback require a compatible PDFium library. Set PDFIUM_LIB_PATH to its library path if automatic discovery cannot find it. PDFium and other vendors' installers are not bundled.

Benchmark methodology and limitations

BlazePDF's latest measurements are from 2 October 2026 (NZDT). Competitor rows retain the 30 September 2026 reference. This is a mixed-date snapshot, not a fresh simultaneous rerun of every competitor. Other applications were running during development, and launch timings vary. Competitors have five or six samples per successful row; BlazePDF has nine. All retained samples are in the raw JSON.

Only identical document/workload pairs are compared. Classification, first-page text, Markdown extraction, 150-DPI rendering and launch-to-visible-window stay separate. Missing/failed measurements are not zero or losses. BlazePDF's matrix uses one complete run, not a collection of historical per-card bests.

The following scores and timings are generated directly from canonical evidence.

Medal / score table

Source: benchmark-20261002T072651Z-merged.json. 40 document/workload cards.

Score is average rank over successfully measured cards (lower is better), not an average of incompatible latencies. Missing cards are ignored: read score alongside coverage. Ties share ranks (1, 1, 3).

ProductGoldSilverBronzeOther placementsCoverageScore ↓
BlazePDF4000040 / 401.00
MuPDF0305540 / 402.45
PDF24 Reader01708 / 402.88
pdf-inspector088723 / 403.04
PDF24 bundled qpdf00268 / 404.38
SumatraPDF0191424 / 404.54
Google Chrome PDF viewer00088 / 404.62
Okular00066 / 404.67
CalyPdf0012324 / 404.96
Foxit PDF Reader00088 / 406.00
Sejda PDF Desktop00088 / 406.62
Xodo PDF Reader00088 / 408.75

Catalogued but not measured/scored: Adobe Acrobat Reader.

Timing comparisons

Median milliseconds, including the declared adapter's launch cost. Reference is the fastest measured non-BlazePDF product for the same document/workload. Gap = reference − BlazePDF; ratio = reference / BlazePDF. Positive gaps and ratios above 1 favor BlazePDF.

Full timing tables for every measured product.

classify + extract markdown

DocumentBlazePDF (ms)Fastest referenceReference (ms)Gap (ms)Ratio
Financial table22.112MuPDF28.259+6.1471.28×
Image document270.299MuPDF298.699+28.4001.11×
Multi-column26.242pdf-inspector69.790+43.5482.66×
Overlapping text18.367MuPDF80.300+61.9334.37×
RTL Hebrew16.577pdf-inspector34.018+17.4412.05×
Rotation16.893MuPDF35.139+18.2462.08×
Signed PDF20.909MuPDF46.613+25.7042.23×
Text-heavy31.393MuPDF38.074+6.6811.21×

classify only

DocumentBlazePDF (ms)Fastest referenceReference (ms)Gap (ms)Ratio
Financial table12.381pdf-inspector22.855+10.4741.85×
Image document21.419MuPDF23.506+2.0871.10×
Multi-column14.033MuPDF20.671+6.6381.47×
Overlapping text18.301MuPDF24.308+6.0071.33×
RTL Hebrew14.543pdf-inspector27.489+12.9461.89×
Rotation13.050MuPDF21.672+8.6221.66×
Signed PDF16.811MuPDF29.015+12.2041.73×
Text-heavy13.455MuPDF14.389+0.9341.07×

launch to visible document window

DocumentBlazePDF (ms)Fastest referenceReference (ms)Gap (ms)Ratio
Financial table20.593MuPDF115.028+94.4355.59×
Image document20.455PDF24 Reader372.615+352.16018.22×
Multi-column20.254MuPDF90.327+70.0734.46×
Overlapping text20.287MuPDF128.300+108.0136.32×
RTL Hebrew21.606MuPDF44.140+22.5342.04×
Rotation20.355MuPDF72.137+51.7823.54×
Signed PDF20.033MuPDF72.812+52.7793.63×
Text-heavy19.940MuPDF67.089+47.1493.36×

open document + first-page text layer

DocumentBlazePDF (ms)Fastest referenceReference (ms)Gap (ms)Ratio
Financial table16.066pdf-inspector40.013+23.9472.49×
Image document190.402SumatraPDF259.716+69.3141.36×
Multi-column16.149pdf-inspector23.606+7.4571.46×
Overlapping text19.844pdf-inspector47.337+27.4932.39×
RTL Hebrew13.055MuPDF25.190+12.1351.93×
Rotation12.890pdf-inspector39.541+26.6513.07×
Signed PDF17.627MuPDF39.021+21.3942.21×
Text-heavy24.715MuPDF56.882+32.1672.30×

render first page at 150 DPI

DocumentBlazePDF (ms)Fastest referenceReference (ms)Gap (ms)Ratio
Financial table43.791MuPDF107.538+63.7472.46×
Image document634.231MuPDF2504.587+1870.3563.95×
Multi-column32.257MuPDF143.759+111.5024.46×
Overlapping text126.200MuPDF300.778+174.5782.38×
RTL Hebrew30.395MuPDF72.218+41.8232.38×
Rotation35.906MuPDF154.254+118.3484.30×
Signed PDF35.599MuPDF131.809+96.2103.70×
Text-heavy46.059MuPDF143.413+97.3543.11×

Reports and evidence

GitHub displays HTML source rather than executing these reports. Download either HTML file and open it locally for the interactive view; Markdown tables work on GitHub.

Reproduce the corpus, tests and benchmarks

Third-party PDFs are not redistributed. Download the eight commit-pinned corpus files and verify their hashes before running acceptance tests or benchmarks:

python scripts/bootstrap_benchmark_corpus.py
python scripts/bootstrap_benchmark_corpus.py --check
cargo test --no-default-features --bin blazepdf --test reader_acceptance
cargo test --no-default-features --test inspection_allocation_budget --test extraction_allocation_budget
python scripts/test_workload_graphs.py
python scripts/test_update_canonical_reports.py
python scripts/test_readme_benchmarks.py
python scripts/update_readme_benchmarks.py --check

Our modified pdf-inspector is preserved as ordinary source: no submodule setup is required. The eight-file bootstrap supplies the top-level acceptance suite. Its larger internal regression suite needs additional upstream fixtures not provisioned by this bootstrap.

With PDFium configured, rerun the full five-workload BlazePDF matrix:

python scripts/benchmark.py --reader blazepdf-first-page --reader blazepdf-inspect --reader blazepdf-render --reader blazepdf --reader blazepdf-window --repeats 9 --no-canonical

To compare the whole new run with the retained reference, replace <new-run> with its timestamped filename:

python scripts/merge_benchmark_runs.py results/benchmark-20260930T040051Z-merged.json results/<new-run>.json results/<new-run>-merged.json
python scripts/update_canonical_reports.py
python scripts/update_readme_benchmarks.py

For a fresh all-product comparison, install/configure the readers in benchmarks/readers.json, then run python scripts/benchmark.py. Executable paths in that manifest describe the original machine: update them for your installation. Missing installations are recorded as skipped. Other vendors' software is not bundled.

Layout

PathPurpose
src/Reader core, CLI and viewport
crates/pdf-inspector/Modified PDF core and bundled CMaps
tests/Acceptance and allocation regression gates
benchmarks/Corpus, pinned fixture sources and reader/product configuration
scripts/Benchmarks, comparisons and report/documentation generation
results/Published final raw evidence and standalone reports
docs/benchmark-timings.mdTimings for every measured product

License and attribution

BlazePDF's own code is MIT licensed. The Firecrawl PDF core, Adobe CMaps, downloaded documents and runtime dependencies retain their notices and terms. See NOTICE.md for source provenance and attribution.

Languages

Rust

88.5%

HTML

9.7%

Python

1.8%