What problem does it solve?
Choosing and debugging the right PDF extraction engine in Xberg is error-prone: the native backend and the Pdfium backend have different capabilities, feature flags, and runtime requirements, and silent fallback between them produces misleading results.
Core Features & Use Cases
- Backend Selection Guidance: Explains how
PdfConfig.backend chooses between PdfBackend::Native (full pipeline: text, tables, annotations, images, attachments, OCR fallback) and PdfBackend::Pdfium (narrower surface: text, page count, Info-dictionary metadata).
- Pdfium Runtime Diagnostics: Covers the
pdf-pdfium Cargo feature, PDFIUM_DYNAMIC_LIB_PATH runtime discovery, process-global binding serialization, and actionable errors when the feature or library is missing.
- OCR and Rendering Control: Details
force_ocr, force_ocr_pages, and the PdfRenderSession primitive for efficient repeated page rendering.
- Use Case: When a user requests Pdfium extraction but gets garbled or missing output, use this Skill to verify the feature flag, dynamic library path, and expected capability gaps instead of assuming a bug in document parsing.
Quick Start
Ask the assistant to switch the Xberg PDF extraction to the Pdfium backend and diagnose why the Pdfium library is not being found at runtime.