PDFium Delphi Component Docs

StructureElements property

Component: TPdf  ·  Unit: PDFium
Returns a flattened logical structure snapshot for the current tagged PDF page

Syntax

property StructureElements: TPdfStructureElements; // read only

Description

Requires Active to be True and a valid current PageNumber

Elements are returned in pre-order with stable Level and ParentIndex values, carrying both the RoleMap-resolved TypeName and, when StructureElementRawTypeFeaturesAvailable is True, the unmapped RawTypeName

The returned array is a caller-owned deep snapshot and changing it does not modify the shared cache or the PDF

Remarks

Example

var
  Items: TPdfStructureElements;
begin
  if Pdf1.Active then
  begin
    Items := Pdf1.StructureElements;
    Memo1.Lines.Add('count: ' + IntToStr(Length(Items)));
  end;
end;

See Also

IsTagged, Structure traversal and cache