StructTreeRoot

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

NameTypeAccessDescription
cOSDictionaryCOSDictionaryReadReturns the underlying COS dictionary.
rootElementStructureElementReadReturns the root structure element (typically the /Document element).
childrenElementListReadReturns all top-level structure elements.
roleMapRoleMapReadReturns the role map for this structure tree.
parentTreeNextKeyintReadReturns the next available parent tree key (/ParentTreeNextKey).
parentTreeNumberTreeReadReturns 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.
allElementsList<StructureElement>ReadReturns all structure elements in the tree (depth-first traversal).

Methods

SignatureDescription
StructTreeRoot(dict: COSDictionary, parser: PDFParser)Creates a StructTreeRoot wrapping the given dictionary.
getCOSDictionary()COSDictionaryReturns the underlying COS dictionary.
getRootElement()StructureElementReturns the root structure element (typically the /Document element).
getChildren()ElementListReturns all top-level structure elements.
getRoleMap()RoleMapReturns the role map for this structure tree.
getParentTreeNextKey()intReturns the next available parent tree key (/ParentTreeNextKey).
getParentTree()NumberTreeReturns 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)COSBaseResolves a single {@code /ParentTree} key.
findElementByMcid(structParentsKey: int, mcid: int)StructureElementReturns 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()StructTreeRootCreates a new StructTreeRoot with a /Document root element.

See Also