Skip to content

v3.3.0 — native PDF-to-Markdown, geometric structure mode, text-layer fixes

Choose a tag to compare

@nataell95 nataell95 released this 08 Jul 01:11
· 17 commits to main since this release
Immutable release. Only release title and notes can be modified.

Native PDF-to-Markdown. /ocr/pdf now takes ?markdown=1 and returns structured Markdown per page — layout, reading order, tables (HTML), and formulas (LaTeX) — rendered inside the same parallel PDF pipeline, with figures embedded as self-contained data URIs. No more splitting PDFs into images client-side and round-tripping through /ocr/markdown. ?as_pages=1 returns one Markdown block per page instead of a single concatenated document. Available on both the GPU and CPU /ocr/pdf routes. Closes #24.

Geometric mode gains structure. mode=geometric now recognizes tables and formulas from the rendered page while keeping the exact PDF text layer for prose — so a born-digital PDF gets perfect text plus real table and formula structure without ever OCRing the text. Geometric never runs OCR: image-only pages return empty prose by design; use mode=auto to recover them via OCR, or mode=ocr to force it.

Text-layer fidelity fixes. PDF text extraction now groups lines by PDFium's character-flow breaks instead of per-font-run rectangles, so small-caps headings and mixed-style lines assemble in the correct order; astral-plane characters encode correctly (UTF-16 surrogates), and control glyphs used for soft and wrap hyphens no longer render as tofu. Unrecognized formula and table regions fall back to plain text rather than emitting broken markup or dropping the content.

Existing request behavior is unchanged. OmniDocBench and throughput at baseline (full-pipeline ~23 pages/s on tiny); GPU and CPU builds, unit tests, and both Docker images verified clean on a fresh from-scratch rebuild.