Check source and record run facts
Hash bytes; enforce file and page limits; inspect encryption, boxes, rotation, and damage; record tools and options.
Level 2 · System flow
The conversion route preserves observations before interpretation. It then builds semantic candidates, writes PDFMD, parses the result again, validates it, and only then renders Markdown.
Main route
Markdown is never reparsed to recover the canonical record. The renderer consumes PDFMD and its package assets directly.
Dependency order
Hash bytes; enforce file and page limits; inspect encryption, boxes, rotation, and damage; record tools and options.
Capture native glyphs, OCR tokens, layout boxes, paths, annotations, and images in normalized page coordinates.
Group baselines and score reading-order candidates using geometry and local continuity.
Use recurrence and sequence evidence so headers and footers do not become body text.
Attach bold, italic, decoration, scripts, color, and highlights to text runs.
Headings, paragraphs, lists, quotations, notes, tables, and graphics.
Join paragraph, list-item, footnote, and table fragments across page events.
Write PDFMD, parse it, validate references and assets, then generate the human view.
Input routes
Decoded glyphs, text matrices, baselines, fonts, paint operations, paths, and annotations are direct observations. OCR may remain as disagreement evidence but cannot replace good native text without a recorded reason.
The page or selected image region is rendered at a recorded resolution. Tesseract supplies tokens and boxes. Missing OCR remains an explicit issue, and the raster asset is retained rather than silently dropped.
Current implementation
The capture → OCR → semantic draft → PDFMD → parse → validate → Markdown route is implemented. Recognition methods exist for the main element classes, but their accepted reliability differs. Complete paragraph assembly, exact scanned-font identification, a general resolver, model routing, and interactive review remain incomplete or planned.