TrendWhat rose on GitHub, every day at 07:30 KST · 한국어

GitHub · as of November 8, 2026 · View on GitHub →

firecrawl/pdf-inspector

Rust PDF processing library

+151 stars in 7 days

Classify PDFs locally to skip unnecessary OCR costs

Determine whether a PDF contains text or is a scanned image in 10 to 50 milliseconds without opening the document. This tool analyzes the PDF content directly to classify it as text-based or scanned, converting it to Markdown quickly only when text is present. It skips unnecessary optical character recognition (OCR) steps, reducing both processing time and cost.

Smart routing to reduce processing costs

Most PDF pipelines process every file in the same way, but applying OCR to PDFs that already contain text wastes time and money. This tool samples the PDF content stream to classify files as text-based, scanned, image-based, or mixed. If a file is identified as text-based, it completes the Markdown conversion locally in under 200 milliseconds and selectively processes only the pages that require OCR. According to the README, approximately 54% of all PDFs can be processed without OCR.

Layout-aware text extraction

It converts documents to Markdown by understanding their structure rather than simply listing text. It analyzes font size ratios to distinguish heading levels from H1 to H4 and applies bold or italic styles based on font name patterns. The tool automatically detects multi-column layouts to correctly reconstruct the reading order of newspaper-style articles. Tables are detected using a dual mode based on rectangular shapes and text alignment, handling financial statements, footnotes, and tables that span multiple pages. Rotated text, such as margin stamps or chart axis titles, retains its original axis-aligned box and reports the rotation angle.

Execution in various environments

The tool is available as a Rust library, a CLI tool, and for Python, Node.js, and browser WebAssembly environments. The default build includes only pure extraction features to remain lightweight, loading external libraries only when OCR is required. Python and Node.js packages include optional OCR functionality, so PDFs with clean text do not load an external OCR runtime. In the browser, the same parser runs locally without server round-trips.

Benchmark results and suitability

Evaluated on the opendataloader-bench corpus (200 PDFs) with OCR disabled, pdf-inspector recorded a composite score of 0.875, a reading order (NID) score of 0.915, a table (TEDS) score of 0.814, and a heading (MHS) score of 0.788. The processing speed for 200 documents was 0.470 seconds. These scores and speeds were higher and faster than those of the comparison targets: liteparse, opendataloader, pymupdf4llm, and markitdown. It is particularly suitable for reports, research papers, financial documents, invoices, and legal documents where table structure and reading order are important. It serves as a default tool for local environments that need clean, structured Markdown without OCR latency or additional infrastructure.

Pre-use considerations

This tool performs best with text-based PDFs. Scanned or image-based PDFs require OCR routing, which necessitates separately installing the PDFium and ONNX Runtime libraries. For Rust and CLI users, the OCR feature must be selected at build time, while it is included in the Python and Node.js packages. Distributed under the MIT license, it allows users to verify parser settings, per-document predictions, and evaluator outputs from a reproducible results branch. It is suitable for large-scale PDF processing pipelines aiming to reduce OCR costs or for local environments requiring fast Markdown conversion.

Written by AI from this repository's README on September 30, 2026. For the facts, the original on GitHub is the reference.

By the numbers

GitHub trending history
13 days between Jun 19, when Trend began recording, and Nov 8, 2026 · first on Aug 3 · best daily rank #3 (Aug 3)

Read from GitHub, as of November 8, 2026.

Language
Rust
Topics
markdown · nodejs · ocr-routing · pdf · pdf-classification · pdf-extraction · pdf-parser · python
Stars
19,953
Stars gained in 7 days
+151
Contributors
12
Forks
1,357
Latest release
v1.25.2 · September 28, 2026
Commits
554
Last commit
October 7, 2026
Open issues
121
Open pull requests
137

Related repositories

View on GitHub → · Homepage

README badge

trend.ondo.sh · GitHub daily trending #3 · August 3, 2026

The badge above shows the highest this repository has ranked on GitHub's daily trending since June 19, 2026, and the day it did. Paste the Markdown below into your README. The badge opens this page, and it updates by itself when the repository climbs higher.

[![trend.ondo.sh](https://trend.ondo.sh/github/r/firecrawl--pdf-inspector/badge.en.svg)](https://trend.ondo.sh/github/r/firecrawl--pdf-inspector/en.html)