property StructureElementsForPage[PageNumber: Integer]: TPdfStructureElements; // read only
| PageNumber | Integer. One-based page index within the loaded document |
| Result | TPdfStructureElements. Array of TPdfStructureElement records in document traversal order |
The first access for a page parses the tagged structure tree with TPdfStructureReadOptions.Default limits, the same traversal used by ReadStructureElements, and returns the elements as managed records carrying level and parent links, type and title strings, alternate and actual text, language, marked content identifiers, attributes, table facts, and associated file references
Every access returns a deep clone, so modifying a returned string or array cannot change the cached tree or the document. A page without tagged structure yields an empty array
Completed trees are retained in the bounded cache described by StructureCacheCapacity and measured against CacheBudgetBytes, so repeated reads of the same page cost one clone instead of one native walk
Calling without an active document raises EPdfError, and a PageNumber outside one through PageCount raises EPdfError with the message Incorrect page number
The non-indexed StructureElements property forwards the current page to this lookup
Use ReadStructureElements or VisitStructureElements for custom limits or a streaming visitor that avoids collecting all elements
Elements := Pdf.StructureElementsForPage[PageNumber];
for I := 0 to High(Elements) do
if Elements[I].MarkedContentID >= 0 then
LogMarkedContent(Elements[I].TypeName, Elements[I].Level);