Interface LayoutBlock

A semantic block within a document page — a paragraph, table, figure, heading, list, or code snippet.

interface LayoutBlock {
    type: "text" | "table" | "figure" | "heading" | "list" | "code";
    content: string;
    bbox: {
        x: number;
        y: number;
        width: number;
        height: number;
    };
    confidence: number;
}

Properties

type: "text" | "table" | "figure" | "heading" | "list" | "code"

Semantic type of the block.

content: string

Text content extracted from the block.

bbox: {
    x: number;
    y: number;
    width: number;
    height: number;
}

Bounding box in page coordinates (pixels). Origin is top-left corner of the page.

Type declaration

  • x: number
  • y: number
  • width: number
  • height: number
confidence: number

Confidence score for this block detection (0–1).