P→MPDFMDSystem documentation
Format referenceOpen converter ↗

Level 4 · Recognition method

Lines, paragraphs, and reading order

The source provides physical fragments. The recognizer must decide which fragments belong to the same logical paragraph and in what order they should be read.

From glyphs or OCR words to lines and columns

Words are grouped around compatible baselines using tolerances relative to local text size and writing direction. Columns are proposed from whitespace gutters, alignment stops, and interruption patterns rather than fixed horizontal bands.

Candidate reading orders are scored for line crossings, column jumps, heading transitions, and local continuity. Source order, paint order, geometry order, and inferred reading order remain distinguishable when they disagree.

First group fragments; then assign a role

Paragraph formation and role classification are separate questions. The first asks whether adjacent fragments belong together. The second asks whether the assembled block is a body paragraph, heading, numbered paragraph, list item, quotation, or something else.

Supports joiningSupports splitting
Same column and text startNew heading or section boundary
Compatible line spacing and paragraph gapBody-margin reset or large gap
Compatible font and local styleMajor style or role change
Open sentence, hyphenation, discourse continuityCaption, table edge, incompatible marker
Rationale. A period can end a sentence inside one paragraph; an abbreviation can end a physical line; a new paragraph can begin without a capital. Punctuation is evidence, not a complete rule.

One paragraph, two page fragments

Figure 3 · Illustrative paragraph continuation
Page 2 body fragment“7. The obligation remains in force un-”
↓
Physical eventsfooter · page number · page break · header
↓
Page 3 body fragment“til the final payment is made.”
↓
One logical paragraphtwo source fragments; explicit hyphen-removal join

The clean text reads continuously. The source map preserves both boxes and every intervening page event.

Hard blockers include a new heading, incompatible list marker, table boundary, caption, major style change, or page/section semantics requiring a break. A future language model may contribute one logged feature, but it may not be the only basis or rewrite the text.

Meaning-first assembly is active development

The present detector can create cross-page paragraph candidates, but the active plan records incomplete physical-line assembly, fixed page-band assumptions, punctuation-heavy continuity logic, and exclusions around marked list lines. The current emitter can still label physical lines as paragraphs. Stronger same-page boundaries and complete cross-page assembly are not yet accepted production behavior.

Practical consequence. A valid output may contain false paragraph splits or joins. The system must expose those as quality findings rather than treating successful parsing as proof of correct paragraph structure.