Open Internet by MindsNet
firecrawl/pdf-inspector
Repository: firecrawl/pdf-inspector Stars: 10777 Forks: 706 Primary language: Rust Discovery sources: trending:daily Selection score: 76.72 Usefulness score: 9.7 Source confidence score: 3.5 Languages: Rust, Python, HTML, JavaScript Topics: markdown, nodejs, ocr-routing, pdf, pdf-classification, pdf-extraction, pdf-parser, python, rust, text-extraction Summary: Fast Rust library for PDF inspection, classification, and text extraction. Intelligently detects scanned vs text-based PDFs to enable smart routing decisions. README excerpt: # pdf-inspector [](https://crates.io/crates/pdf-inspector) [](https://www.npmjs.com/package/@firecrawl/pdf-inspector) [](https://pypi.org/project/pdf-inspector/) [](LICENSE) Fast Rust library for PDF classification and text extraction. Detects whether a PDF is text-based or scanned, extracts text with position awareness, and converts to clean Markdown — all without OCR. Includes bindings for [Python](docs/python.md), [Node.js](napi/README.md), and [browser WebAssembly](wasm/README.md). Built by [Firecrawl](https://firecrawl.dev) to handle text-based PDFs locally in under 200ms, skipping expensive OCR services for the ~54% of PDFs that don't need them. ## Features - **Smart classification** — Detect TextBased, Scanned, ImageBased, or Mixed PDFs in ~10-50ms by sampling content streams. Returns a confidence score (0.0-1.0) and per-page OCR routing. - **Text extraction** — Position-aware extraction with font info, X/Y coordinates, and automatic multi-column reading order. - **Markdown conversion** — Headings (H1-H4 via font size ratios), bullet/numbered/letter lists, code blocks (monospace font detection), tables (rectangle-based and heuristic), bold/italic formatting, URL linking, and page breaks. - **Table detection** — Dual-mode: rectangle-based detection from PDF drawing ops, plus heuristic detection from text alignment. Handles
Computing & Technology, Computer Science, Web Development