HeaderElement

HeaderElement

Overview

HeaderElement is a class in Aspose.Pdf FOSS for Java. Inherits from: Element.

Represents a header structure element (H, H1–H6) in the logical structure tree (ISO 32000-1:2008, §14.8.4.3, Table 334).

Properties

NameTypeAccessDescription
levelintReadReturns the heading level (0 = H, 1–6 = H1–H6).
textStringReadReturns the actual text (/ActualText) of this element.
languageStringReadReturns the language (/Lang) of this element.
structureElementStructureElementReadReturns the underlying structure element.
titleStringReadReturns the title (/T) of this element.
alternateDescriptionStringReadReturns the alternate description (/Alt) of this element.
structureTextStateStructureTextStateReadReturns the structure text state for this element.
alternativeTextStringReadReturns the alternative text (/Alt) for this element.
positionSettingsPositionSettingsReadReturns the position settings for this element.

Methods

SignatureDescription
HeaderElement(se: StructureElement)Creates a generic header element (H) wrapping the given structure element.
HeaderElement(se: StructureElement, level: int)Creates a header element at the specified level.
getLevel()intReturns the heading level (0 = H, 1–6 = H1–H6).
setLevel(level: int)Sets the heading level and updates the underlying structure type.
addEntryToTocPage(tocPage: Page, toci: Element)Adds an entry for this header to a TOC page, linking it to a TOC item.
setText(text: String)Sets the actual text (/ActualText) for this element.
getText()StringReturns the actual text (/ActualText) of this element.
setLanguage(lang: String)Sets the language (/Lang) for this element.
getLanguage()StringReturns the language (/Lang) of this element.
appendChild(child: Element)Appends a child element.
getStructureElement()StructureElementReturns the underlying structure element.
setTitle(title: String)Sets the title (/T) for this element.
getTitle()StringReturns the title (/T) of this element.
setAlternateDescription(alt: String)Sets the alternate description (/Alt) for this element.
getAlternateDescription()StringReturns the alternate description (/Alt) of this element.
getStructureTextState()StructureTextStateReturns the structure text state for this element.
setAlternativeText(text: String)Sets the alternative text (/Alt) for this element.
getAlternativeText()StringReturns the alternative text (/Alt) for this element.
adjustPosition(settings: PositionSettings)Adjusts the position of this element using the given settings.
getPositionSettings()PositionSettingsReturns the position settings for this element.

See Also