Inspect
Read the document structure and report what the file actually contains, page by page.
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.
Sheet values are illustrative. The library reports the signals; the routing policy is yours.
Read the document structure and report what the file actually contains, page by page.
Separate scanned image pages from pages that already carry selectable text.
Pull text where text exists, and hand the rest to whatever OCR stage you run.