file2markdown
pdf-inspectordoclingpdf to markdownfirecrawlibmragllmdocument parsing

pdf-inspector vs Docling: Speed or Layout Intelligence for PDF to Markdown?

August 5, 2026

pdf-inspector vs Docling: Speed or Layout Intelligence for PDF to Markdown?

These two open-source tools sit at opposite ends of the PDF parsing spectrum. Firecrawl's pdf-inspector is a Rust engine built for raw speed — milliseconds per document, small enough to run in a browser tab. IBM's Docling is an AI document-understanding system built for accuracy — layout detection models that correctly untangle multi-column pages, dense tables, and figures, at the cost of heavyweight dependencies and slow processing.

Choosing between them is really choosing what your documents need. (And if the answer is "I just want Markdown without installing either," file2markdown runs pdf-inspector for text PDFs plus OCR for scans — try the free converter.)

The Quick Answer

Use pdf-inspector for native-text PDFs at scale — reports, contracts, invoices, documentation. It converts in milliseconds what takes Docling seconds to minutes, and the structure quality on ordinary documents is comparable.

Use Docling when layout complexity is the problem: academic papers with two-column layouts and floating figures, scanned documents needing OCR, or tables so dense that losing a cell breaks the meaning.

What Each Tool Is

pdf-inspector (Firecrawl, MIT, 2026) parses the PDF content stream directly in Rust. It classifies documents as text-based or scanned (~10–50ms, with a confidence score and per-page OCR routing hints), extracts position-aware text, and emits Markdown with headings inferred from font metrics, plus lists, code blocks, and tables. Bindings: Python, Node.js, Rust, browser WASM.

Docling (IBM Research, MIT) runs machine-learning models for layout analysis and table structure recognition over each page. It understands reading order, figures, captions, and complex tables, exports to Markdown or JSON, and includes OCR for scanned input. The cost is a PyTorch-sized install and per-page model inference.

Head-to-Head Comparison

pdf-inspectorDocling
SpeedMilliseconds per documentSeconds to minutes (GPU helps)
ApproachContent-stream parsing (Rust)AI layout models (PyTorch)
Multi-column PDFsCan scramble reading orderHandles correctly
Complex tablesGood on regular tablesBest-in-class
OCR / scanned PDFsClassify-only, no OCRBuilt-in
Install footprintTiny (single wheel / npm package)Large (PyTorch dependency)
Runs in browserYes (WASM)No
OutputMarkdownMarkdown, JSON, DoclingDocument
LicenseMITMIT

The Trade-off in Practice

On clean, native-text business documents — invoices, contracts, reports — the two produce similar Markdown, and pdf-inspector's speed advantage is decisive: in our tests it converted a 200-page academic paper in under 200ms, structure included. Running Docling's layout models on the same file takes orders of magnitude longer.

On genuinely hard layouts, the ranking flips. pdf-inspector infers structure from font metrics and positions, so a two-column research paper can come out with paragraphs interleaved. Docling's layout model reads the page the way a human does. If retrieval quality on academic or heavily designed PDFs is your bottleneck, Docling's slowness buys real accuracy.

Installing and Using Each

pdf-inspector

pip install pdf-inspector
import pdf_inspector

result = pdf_inspector.process_pdf_bytes(open("report.pdf", "rb").read())
print(result.pdf_type)     # text_based / scanned / mixed
print(result.markdown)

Docling

pip install docling
from docling.document_converter import DocumentConverter

converter = DocumentConverter()
result = converter.convert("report.pdf")
print(result.document.export_to_markdown())

Which Should You Use?

  • High-volume pipelines over ordinary documents → pdf-inspector. Millisecond conversion changes what is architecturally possible (including parsing client-side in the browser).
  • Academic papers, multi-column layouts, dense tables → Docling. See our Docling vs MarkItDown and Marker vs Docling comparisons for how it stacks up against other accuracy-focused tools.
  • Scanned documents → Docling has OCR built in; pdf-inspector only flags them. Our scanned PDF guide covers the full option space.
  • Neither installfile2markdown pairs pdf-inspector's engine with automatic OCR and every other document format, through a browser or REST API.

For the full landscape, see the best PDF to Markdown converters in 2026.

The Markdown Memo

A fortnightly note for lawyers, researchers, accountants, and anyone else drowning in PDFs, scans, and decks. No spam.