AIAny
AI Infra2026
Icon for item

pdf-inspector

Rust library for fast PDF classification and position-aware text extraction that converts native-text PDFs to structured Markdown without OCR. Offers per-page OCR routing, multi-column and table detection, and Python/Node.js/WebAssembly bindings for low-latency local pipelines.

Introduction

Most PDF pipelines waste time and money running OCR on every file. This library flips that cost model: by quickly identifying which pages actually contain extractable text and then extracting position-aware content into clean Markdown, it lets pipelines skip OCR for the sizable fraction of PDFs that are already native-text.

What Sets It Apart
  • Fast, sampling-based classification: detects TextBased/Scanned/ImageBased/Mixed PDFs in ~10–50 ms and returns per-page OCR routing so you only OCR what needs it. This reduces end-to-end latency compared with blind OCR-first pipelines.
  • Low-latency extraction tuned for structure: position-aware text items with font and XY data, automatic multi-column reading order, rectangle+heuristic table detection, heading tiers, lists, code block detection, URL linking, and Markdown conversion — all without ML models or external services.
  • Benchmarked and pragmatic: on a 200-document corpus it scored 0.875 overall and completed the run in a median 0.470s (engine run on Apple M4 Pro), making it a competitive local default when reading order and table fidelity matter.
  • Practical engineering trade-offs: single-document parse shared across detection and extraction to avoid redundant I/O, ToUnicode/CID font handling, encoding issue detection that flags pages to fall back to OCR when necessary, and browser WebAssembly support for client-side parsing.
Who It's For — and When Not To Use It

Great fit if you operate document-processing pipelines where many PDFs are already native-text (reports, papers, invoices, legal docs) and you need fast, structured Markdown or per-page OCR routing to cut cost and latency. Look elsewhere if your corpus is predominantly scanned-image PDFs and you require built-in OCR: pdf-inspector intentionally omits OCR and focuses on accurate, high-speed extraction for text-based content (it will flag pages that need OCR instead of performing it).

Information

  • Websitegithub.com
  • OrganizationsFirecrawl
  • Published date2026/02/06

Categories

More Items

GitHub
AI Deploy2026

Runs large open-weight MoE models locally by coordinating CPU and GPU resources, caching experts, and reallocating VRAM at runtime. It targets consumer hardware, from laptops to workstation GPUs.

GitHub
AI Agent2026

Gives employees AI agents that can work with company tools, files, and browser sessions. Runs on infrastructure you control, with governed actions and an audit trail.

GitHub
AI Infra2026

Builds a semantic context layer for enterprise data that helps agents interpret metrics, entities, and relationships consistently. It validates generated queries against certified definitions and lineage, and returns provenance with answers.