firecrawl / pdf-inspector
Rust library · PDF triage
Classification before extraction

Know what kind of PDF you have before you pay to read it.

pdf-inspector is a fast Rust library for PDF inspection, classification, and text extraction. It detects scanned versus text-based PDFs so a pipeline can route each file to the cheap path or the OCR path on purpose.

Language
Rust
Does
Inspection, classification, text extraction
Decides
Scanned image pages versus embedded text
Enables
Smart routing decisions upstream of OCR
Specimen
Inspection sheet Illustrative
contract-1998-scan.pdf
42 pages
Embedded text6%
Image coverage97%
Font objects0
Scanned route → OCR pipeline
q3-report-export.pdf
18 pages
Embedded text99%
Image coverage11%
Font objects7
Text-based route → direct extraction

Sheet values are illustrative. The library reports the signals; the routing policy is yours.

01

Inspect

Read the document structure and report what the file actually contains, page by page.

02

Classify

Separate scanned image pages from pages that already carry selectable text.

03

Extract

Pull text where text exists, and hand the rest to whatever OCR stage you run.