GetStructTreeItemIntProperty
Tagged PDF, Content Extraction
Description
Returns a numeric property of one structure tree snapshot item.
Syntax
Delphi
Function TPDFlib.GetStructTreeItemIntProperty(Index, PropertyID: Integer): Integer;Parameters
| Index | 1-based item index from the most recent StructTreeItemCount call. |
|---|---|
| PropertyID | 1 the number of child structure elements; 2 the number of marked-content ids; 3 the first marked-content id (-1 when none); 4 the 1-based page number the element's content sits on (0 when unknown); 5 the element's indirect object number; 6 the nesting level (1 = document level); 7 the 1-based item index of the parent (0 = the structure tree root). |
Return values
| 0 | The index is out of range, or the property value is zero. |
|---|---|
| N | The requested property value. |
Remarks
The page number comes from the element's /Pg entry, or from its first marked-content reference when the element itself carries none. Parent and level values allow the flat item list to be walked as a tree without touching PDF objects.
Example
Level:= PDF.GetStructTreeItemIntProperty(I, 6);
Page:= PDF.GetStructTreeItemIntProperty(I, 4);