New Rust Library Classifies and Extracts PDF Text in Under 200ms Without OCR or ML Models
Summary
A new open-source Rust library called pdf-inspector now classifies and extracts PDF text in under 200ms without OCR or ML models, supporting Python, Node.js, and WebAssembly, and outperforming all tested local engines across 200 PDFs — completing the full corpus in just 0.47 seconds.
Key Points
- A fast, open-source Rust library called pdf-inspector is now available, offering PDF classification and text extraction in under 200ms, with bindings for Python, Node.js, and browser WebAssembly — no OCR or ML models required.
- The library intelligently detects whether a PDF is text-based, scanned, image-based, or mixed, enabling smart routing decisions that skip expensive OCR services for the roughly 54% of PDFs that don't need them.
- Benchmark results on 200 PDFs show pdf-inspector leading all tested local engines in overall score, reading order, table detection, and speed, completing the full corpus in just 0.47 seconds on an Apple M4 Pro.