P→MPDFMDSystem documentation
Format referenceOpen converter ↗

Level 4 · Recognition method

Type, decoration, and color

Native PDFs expose font and paint facts directly. Scanned pages require inference from pixels. Text-reading confidence and appearance confidence remain separate.

Bold and italic

Native evidence

PDF font flags, normalized font name, weight or slant, text-rendering mode, and glyph outline or stroke measurements.

Scanned evidence

Word-relative stem width, ink mass, slant, spacing, and scale-stable comparison with a local family or style cohort.

Run smoothing may fill a short gap only when both neighbors share the style and the gap is visually compatible. One heavy token cannot make a whole paragraph bold. Resolved runs map to **bold**, *italic*, or ***bold italic***.

Font identity is a harder, separate decision

For scanned text, the system compares eligible words and lines with a verified catalog using glyph shape, spacing, renderer-conditioned descriptors, and non-emitting guard fonts. Document-wide work is bounded and selected deterministically. If the best match is not separated sufficiently from alternatives or guards, the output must abstain.

Current status. The independent exact-name gate did not pass: exact common-font identity remains limited and must not be presented as accepted. Generic family or observed appearance can still be recorded.

Position relative to the local text

CandidateEvidence and confounders
UnderlineThin stroke below the baseline following a text run; reject table rules, signature lines, and separators.
StrikethroughStroke through local x-height or midline; reject grid lines and graphical interference.
Superscript or subscriptSmaller local height, stable vertical displacement, compatible spacing; compete with footnote-call classification.

Local medians are used instead of one absolute font size. Prefix, infix, suffix, and multi-character script runs are allowed.

Foreground color is not highlighting

Native extraction reads text fill and stroke colors, color-space conversion, opacity, annotations, and paint order. Scan analysis masks glyphs so ink pixels are measured separately from the background and antialiasing fringe.

ObservationInterpretation
Color confined to glyph strokesForeground text color
Coherent color around glyph masksText highlight
Fill bounded by a cell and shared across itCell or row shading
Low-opacity region crossing unrelated contentWatermark or artifact
Colored irregular freehand strokeHandwriting ink candidate

Uncertain overlap retains competing assertions. It is not forced into the highlight class.