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
| Name | Type | Access | Description |
|---|---|---|---|
cOSDictionary | COSDictionary | Read | Returns the underlying COS dictionary. |
structureType | StructureTypeStandard | Read | Returns the structure type (e.g., P, H1, Table, Div). |
title | String | Read | Returns the title (/T). |
language | String | Read | Returns the language (/Lang). |
alternateDescription | String | Read | Returns the alternate description (/Alt). |
actualText | String | Read | Returns the actual text (/ActualText). |
expandedForm | String | Read | Returns the expanded form (/E). |
iD | String | Read | Returns the element ID (/ID). |
childElements | ElementList | Read | Returns only StructureElement children (filters out MCR, OBJR, integers). |
allKids | List<Object> | Read | Returns ALL child items: StructureElements, MarkedContentReferences, |
| ObjectReferences, and bare MCIDs. | |||
parent | StructureElement | Read | Returns the parent element, or {@code null} for root-level elements. |
Methods
| Signature | Description |
|---|---|
StructureElement(dict: COSDictionary, parser: PDFParser) | Creates a structure element wrapping the given dictionary. |
getCOSDictionary() → COSDictionary | Returns the underlying COS dictionary. |
getStructureType() → StructureTypeStandard | Returns the structure type (e.g., P, H1, Table, Div). |
setStructureType(type: StructureTypeStandard) | Sets the structure type. |
getTitle() → String | Returns the title (/T). |
setTitle(title: String) | Sets the title (/T). |
getLanguage() → String | Returns the language (/Lang). |
setLanguage(lang: String) | Sets the language (/Lang). |
getAlternateDescription() → String | Returns the alternate description (/Alt). |
setAlternateDescription(alt: String) | Sets the alternate description (/Alt). |
getActualText() → String | Returns the actual text (/ActualText). |
setActualText(text: String) | Sets the actual text (/ActualText). |
getExpandedForm() → String | Returns the expanded form (/E). |
setExpandedForm(expanded: String) | Sets the expanded form (/E). |
getID() → String | Returns the element ID (/ID). |
setID(id: String) | Sets the element ID (/ID). |
getChildElements() → ElementList | Returns 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() → StructureElement | Returns the parent element, or {@code null} for root-level elements. |