StackMap
Subscribe

pdf-inspector vs xberg

Firecrawl's Rust PDF triage: classifies text-based vs scanned in ~10-50ms, extracts positioned text and clean Markdown without OCR — routing the ~54% of PDFs that never needed a model. — versus — Rust-core extraction orchestrator with 15 language bindings: 96 formats — PDF, Office, images, audio, code, web — to clean text, tables and RAG-ready chunks. OCR and structured extraction built in.

The curated verdict

Both are deterministic Rust document engines with multi-language bindings. xberg goes wide — 96 formats into RAG-ready chunks; pdf-inspector goes deep on one format with classification, confidence scores and OCR routing.

pdf-inspectorxberg
Stars19k9.3k
Forks1.3k580
LanguageRustRust
LicenseMITMIT
Last activity3 days ago3 days ago
Topicsocr, ragocr, rag, local
Curated connections77

pdf-inspector — the curator's take

The router your document pipeline is missing: most stacks OCR everything, but ~54% of PDFs are text-based — this classifies in tens of milliseconds (with confidence and per-page routing), extracts locally in under 200ms, and only the genuinely scanned pages go to an expensive OCR model. Pure Rust, one dependency, bindings for Python, Node and browser WASM. NOT an OCR engine and NOT a layout-analysis heavyweight: scanned documents still need a model downstream, and complex-layout fidelity trails ML parsers — its job is knowing when you don't need them.

xberg — the curator's take

The polyglot pick: reach for Xberg when your stack spans Rust, Python, Node, Go, the JVM or WASM and you want ONE extraction engine instead of a per-language pipeline. Handles 96 formats — PDFs, Office, images, audio/video (Whisper), source code (306 languages, syntax-aware chunking) — and websites, dynamic pages included. OCR is built in, not bolted on: ONNX and Candle models run locally, or any VLM (Gemini, Mistral, …) through LiteLLM; on top sit structured extraction to a JSON schema and NER, keywords, classification and captioning. Think of it as a parallel extraction orchestrator with a plugin architecture — a MinerU backend or your own local VLM can sit behind it — rather than a single parser. It's the v1 successor to Kreuzberg. Don't reach for it if all you need is max-fidelity parsing of messy scanned PDFs and nothing else (a dedicated VLM like MinerU or olmocr is the shorter path, though either can also run behind Xberg), or if you're Python-only and already committed to LlamaIndex's own readers.