TPDFlibPageElement

Data Types

Description

TPDFlibPageElement is a unified record structure carrying metadata for structured page elements (text blocks, raster images, and vector paths) extracted from PDF documents.

Syntax

Delphi

type TPDFlibPageElement = record
    Kind: TPDFlibPageElementKind;
    Page: Integer;
    Left: Double;
    Top: Double;
    Right: Double;
    Bottom: Double;
    Text: WideString;
    FontName: WideString;
    FontSize: Double;
    ImageID: Integer;
    PointCount: Integer;
    IsClosed: Boolean;
    PaintOp: WideString;
  end;

Fields

KindThe structural classification specified by TPDFlibPageElementKind.
PageThe 1-based page index where the element is located.
LeftThe horizontal offset coordinate of the bounding box.
TopThe vertical offset coordinate of the bounding box.
RightThe right edge boundary coordinate of the bounding box.
BottomThe bottom edge boundary coordinate of the bounding box.
TextThe Unicode text content string (valid only when Kind is ekText).
FontNameThe font name referenced by the text block (valid only when Kind is ekText).
FontSizeThe font size in points (valid only when Kind is ekText).
ImageIDThe internal raster image resource handle, usable with image selection APIs (valid only when Kind is ekImage).
PointCountThe count of construction path vector nodes (valid only when Kind is ekPath).
IsClosedSpecifies whether the path was closed (valid only when Kind is ekPath).
PaintOpThe PDF paint operator character that paints this path (e.g. f for fill, S for stroke, or B for both; valid only when Kind is ekPath).

See also

TPDFlibPageElementKind, EnumPageElements