Skip to content
Lamina PDF
Unreleased

These docs describe changes that aren’t released yet. For the newest release, see the released docs.

ExtractedBlock

ExtractedBlock = object & ({ level: number; type: "heading"; } | { type: "paragraph"; } | { depth: number; marker: string; type: "list-item"; } | { type: "caption"; } | { type: "footnote"; } | { type: "other"; } | { cols: number; detector: TableDetector; rows: number; type: "table"; })

A block and where its text sits in the Markdown.

bbox: [number, number, number, number]

The block’s box in page space.

optional bboxNorm?: [number, number, number, number] | null

The box divided by the page’s width and height, clamped to [0, 1]; None when the block lies wholly outside the page.

optional cells?: Cell[]

A table’s cells, row by row; empty for every other block.

confidence: number

In [0, 1]: 1 for structure from the tree, lower for structure inferred from layout.

id: string

p<page index>-b<position in the page's reading order>.

page: number

The page index.

spans: Span[]

The runs of text, in reading order.

structPath: string[]

The structure types from the root down to the block; empty when untagged.

optional structRef?: StructRef | null

The structure element the block comes from, when it comes from one.

text: string

The visible text, lines joined by a space after the text fixes (ADR 0030 §5).

textRange: TextRange