StructTreeRoot
Overview
StructTreeRoot is a class in Aspose.Pdf FOSS for Java.
The root of the logical structure tree (ISO 32000-1:2008, §14.7.2, Table 322).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
cOSDictionary | COSDictionary | Read | Returns the underlying COS dictionary. |
rootElement | StructureElement | Read | Returns the root structure element (typically the /Document element). |
children | ElementList | Read | Returns all top-level structure elements. |
roleMap | RoleMap | Read | Returns the role map for this structure tree. |
parentTreeNextKey | int | Read | Returns the next available parent tree key (/ParentTreeNextKey). |
parentTree | NumberTree | Read | Returns the {@code /ParentTree} number tree (§14.7.4.4) — the reverse |
| map from a page’s structural parent key (the /StructParents entry on | |||
| the page) and from a content stream’s marked-content identifier | |||
| (MCID, indexed via the page entry) back to the structure element(s) | |||
| referencing them. | |||
allElements | List<StructureElement> | Read | Returns all structure elements in the tree (depth-first traversal). |
Methods
| Signature | Description |
|---|---|
StructTreeRoot(dict: COSDictionary, parser: PDFParser) | Creates a StructTreeRoot wrapping the given dictionary. |
getCOSDictionary() → COSDictionary | Returns the underlying COS dictionary. |
getRootElement() → StructureElement | Returns the root structure element (typically the /Document element). |
getChildren() → ElementList | Returns all top-level structure elements. |
getRoleMap() → RoleMap | Returns the role map for this structure tree. |
getParentTreeNextKey() → int | Returns the next available parent tree key (/ParentTreeNextKey). |
getParentTree() → NumberTree | Returns the {@code /ParentTree} number tree (§14.7.4.4) — the reverse |
| map from a page’s structural parent key (the /StructParents entry on | |
| the page) and from a content stream’s marked-content identifier | |
| (MCID, indexed via the page entry) back to the structure element(s) | |
| referencing them. | |
lookupParentTreeEntry(key: int) → COSBase | Resolves a single {@code /ParentTree} key. |
findElementByMcid(structParentsKey: int, mcid: int) → StructureElement | Returns the structure element that owns the marked-content with the |
| given MCID on a page identified by its {@code /StructParents} key. | |
getAllElements() → List<StructureElement> | Returns all structure elements in the tree (depth-first traversal). |
findElements(typeName: String) → List<StructureElement> | Finds all structure elements matching the given structure type name. |
clearChilds() | Removes all child elements from the structure tree. |
createNew() → StructTreeRoot | Creates a new StructTreeRoot with a /Document root element. |