MerchantryTidbits

doc-parsing / library

pdf-inspector

Capability: pdf-inspector

Use it when

  • A document pipeline sends every incoming PDF through a slow, expensive OCR service even though most are digitally generated with an intact text layer
  • You need text-based PDFs (reports, invoices, papers, legal docs) converted to clean Markdown with headings, lists, and tables preserved, locally and in milliseconds

What it solves

Not the fit when

  • Extracting text from scanned or image-only pages; it deliberately does no OCR and instead flags those pages for an external OCR fallback.
  • Handwriting, semantic figure interpretation, or ML-based layout understanding; it is a heuristic native-text parser.
  • Treating repository timing and benchmark results as universal; performance depends on the PDF corpus and hardware.
  • Unreviewed extraction in high-stakes workflows where parsing or reading-order errors can change meaning.
  • ocr of scanned or photographed pages
  • handwriting recognition
  • semantic layout understanding via ml models

Install

npm install @firecrawl/pdf-inspector (Node.js), cargo add pdf-inspector (Rust), cargo install pdf-inspector (pdf2md and detect-pdf CLIs), npm install @firecrawl/pdf-inspector-wasm (browser), or pip install maturin && maturin develop --release (Python)

Invoke

Call processPdf / pdf_inspector.process_pdf on a PDF to get pdfType (TextBased, Scanned, ImageBased, Mixed) plus Markdown output, or classifyPdf for detection only with pages_needing_ocr for per-page OCR routing; CLI: pdf2md document.pdf for Markdown, detect-pdf document.pdf --json for classification

Alternatives

No reviewed alternatives recorded yet.