StructureElement

StructureElement

Overview

StructureElement is a class in Aspose.Pdf FOSS for Java.

Represents a structure element in the logical structure tree (ISO 32000-1:2008, §14.7.2, Table 323).

Properties

NameTypeAccessDescription
cOSDictionaryCOSDictionaryReadReturns the underlying COS dictionary.
structureTypeStructureTypeStandardReadReturns the structure type (e.g., P, H1, Table, Div).
titleStringReadReturns the title (/T).
languageStringReadReturns the language (/Lang).
alternateDescriptionStringReadReturns the alternate description (/Alt).
actualTextStringReadReturns the actual text (/ActualText).
expandedFormStringReadReturns the expanded form (/E).
iDStringReadReturns the element ID (/ID).
childElementsElementListReadReturns only StructureElement children (filters out MCR, OBJR, integers).
allKidsList<Object>ReadReturns ALL child items: StructureElements, MarkedContentReferences,
ObjectReferences, and bare MCIDs.
parentStructureElementReadReturns the parent element, or {@code null} for root-level elements.

Methods

SignatureDescription
StructureElement(dict: COSDictionary, parser: PDFParser)Creates a structure element wrapping the given dictionary.
getCOSDictionary()COSDictionaryReturns the underlying COS dictionary.
getStructureType()StructureTypeStandardReturns the structure type (e.g., P, H1, Table, Div).
setStructureType(type: StructureTypeStandard)Sets the structure type.
getTitle()StringReturns the title (/T).
setTitle(title: String)Sets the title (/T).
getLanguage()StringReturns the language (/Lang).
setLanguage(lang: String)Sets the language (/Lang).
getAlternateDescription()StringReturns the alternate description (/Alt).
setAlternateDescription(alt: String)Sets the alternate description (/Alt).
getActualText()StringReturns the actual text (/ActualText).
setActualText(text: String)Sets the actual text (/ActualText).
getExpandedForm()StringReturns the expanded form (/E).
setExpandedForm(expanded: String)Sets the expanded form (/E).
getID()StringReturns the element ID (/ID).
setID(id: String)Sets the element ID (/ID).
getChildElements()ElementListReturns only StructureElement children (filters out MCR, OBJR, integers).
getAllKids()List<Object>Returns ALL child items: StructureElements, MarkedContentReferences,
ObjectReferences, and bare MCIDs.
appendChild(child: StructureElement)Appends a child structure element.
appendMarkedContent(mcid: int, page: COSDictionary)Appends a marked content reference (MCID) as a child.
getParent()StructureElementReturns the parent element, or {@code null} for root-level elements.

See Also