quality="auto" is the default extraction tier: table structure, the document's own heading levels and OCR for pages without a text layer. Pass quality="fast" to keep the 1.2 output. On opendataloader-bench SDK 1.4.0 scores 0.9282 overall.* Auto needs a one-time model install, and OCR of scanned pages needs Tesseract on the machine. Release post · Benchmark results*Submitted to the benchmark repository, PR #37 and #38, not on its public leaderboard yet. Measured with the benchmark's own harness on its 200 documents; final macOS arm64 release wheel; other engines as published in its README, not re-run by us. Full caveats on the benchmarks page.# Rust
cargo add pdfluent@1.4.0
# Python
pip install pdfluent==1.4.0
# Node.js
npm install @pdfluent/node
# Models for the auto and balanced tiers
pdfluent models install layout tablesfrom pdfluent import Document
from pdfluent.chunks import iter_chunks
with Document("report.pdf") as doc:
md = doc.extract_markdown() # fast tier, no models
md_tables = doc.extract_markdown(quality="balanced") # needs installed models
words = doc.extract_words()
for chunk in iter_chunks(doc, mode="markdown"):
print(chunk.text)extract_markdown returns Markdown: headings, list items, table cells, running heads. In Python the default quality="fast" runs the engine alone, written in Rust, with no models, and works everywhere including WebAssembly. quality="balanced" runs a layout model and a table-structure model locally through ONNX Runtime and is Markdown only: extract_markdown reads it, extract_blocks refuses it.
extract_blocks returns blocks: paragraphs, headings with level, list items, table cells with grid position, running heads, each with page and box. In Rust, to_json(&blocks) renders the blocks as JSON. In WebAssembly and .NET, extractBlocks returns a JSON string.
extract_words returns words with boxes, for pipelines that need token-level positions rather than block structure. Python, Node, WebAssembly, Java and .NET all expose it.
extract_docling returns a Docling-shaped JSON (DoclingDocument) for pipelines built on Docling. Python, Node, WebAssembly, Java and .NET all expose it; in Python the call takes first_page, page_count and name.