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).

This class provides 13 methods for working with StructTreeRoot objects in Java programs. Available methods include: StructTreeRoot, clearChilds, createNew, findElementByMcid, findElements, getAllElements, getChildren, getParentTree, getParentTreeNextKey, getPdfDictionary, getRoleMap, getRootElement, and 1 additional methods. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package. Properties: allElements, children, parentTree, parentTreeNextKey, pdfDictionary, roleMap, and 1 more.

Properties

NameTypeAccessDescription
pdfDictionaryPdfDictionaryReadReturns the underlying PDF 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: PdfDictionary, parser: PDFParser)Creates a StructTreeRoot wrapping the given dictionary.
getPdfDictionary()PdfDictionaryReturns the underlying PDF 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)PdfBaseResolves 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

 English