Heading

Overview

Heading is a class in Aspose.Pdf FOSS for Java. Inherits from: BaseParagraph.

Represents a heading element that can be used in a table of contents.

Properties

NameTypeAccessDescription
levelintReadReturns the heading level.
textStringReadReturns the display text of this heading.
tocPagePageReadReturns the TOC page where this heading entry appears.
destinationPagePageReadReturns the destination page that this heading links to.
topdoubleReadReturns the top Y coordinate for the destination on the target page.
segmentsList<TextSegment>ReadReturns the list of text segments composing this heading.
autoSequencebooleanReadReturns whether this heading is auto-sequenced in the TOC.
inListbooleanReadReturns whether this heading appears in the TOC list.
styleNumberingStyleReadReturns the numbering style for this heading.
startNumberintReadReturns the start number for auto-sequencing.
textStateTextStateReadReturns the text state (font, size, color) for this heading.
horizontalAlignmentHorizontalAlignmentReadReturns the horizontal alignment.
marginMarginInfoReadGets the margin information for this paragraph.
inLineParagraphbooleanReadReturns whether this paragraph is an inline element.
keptWithNextbooleanReadReturns whether this paragraph should be kept together with the next paragraph
on the same page during layout.
firstParagraphInColumnbooleanReadReturns whether this paragraph is the first in its column.
inNewPagebooleanReadReturns whether this paragraph should start on a new page during layout.
hyperlinkHyperlinkReadReturns the hyperlink attached to this paragraph (web, local or file
target), or {@code null} if the paragraph is not clickable.

Methods

SignatureDescription
Heading(level: int)Creates a heading with the specified level.
getLevel()intReturns the heading level.
setLevel(level: int)Sets the heading level.
getText()StringReturns the display text of this heading.
setText(text: String)Sets the display text of this heading.
getTocPage()PageReturns the TOC page where this heading entry appears.
setTocPage(tocPage: Page)Sets the TOC page where this heading entry appears.
getDestinationPage()PageReturns the destination page that this heading links to.
setDestinationPage(destinationPage: Page)Sets the destination page that this heading links to.
getTop()doubleReturns the top Y coordinate for the destination on the target page.
setTop(top: double)Sets the top Y coordinate for the destination on the target page.
getSegments()List<TextSegment>Returns the list of text segments composing this heading.
isAutoSequence()booleanReturns whether this heading is auto-sequenced in the TOC.
setIsAutoSequence(autoSequence: boolean)Sets whether this heading is auto-sequenced in the TOC.
isInList()booleanReturns whether this heading appears in the TOC list.
setIsInList(inList: boolean)Sets whether this heading appears in the TOC list.
getStyle()NumberingStyleReturns the numbering style for this heading.
setStyle(style: NumberingStyle)Sets the numbering style for this heading.
getStartNumber()intReturns the start number for auto-sequencing.
setStartNumber(startNumber: int)Sets the start number for auto-sequencing.
getTextState()TextStateReturns the text state (font, size, color) for this heading.
getHorizontalAlignment()HorizontalAlignmentReturns the horizontal alignment.
setHorizontalAlignment(alignment: HorizontalAlignment)Sets the horizontal alignment.
getMargin()MarginInfoGets the margin information for this paragraph.
setMargin(margin: MarginInfo)Sets the margin information for this paragraph.
isInLineParagraph()booleanReturns whether this paragraph is an inline element.
setInLineParagraph(inLineParagraph: boolean)Sets whether this paragraph should be treated as an inline element.
isKeptWithNext()booleanReturns whether this paragraph should be kept together with the next paragraph
on the same page during layout.
setKeptWithNext(keptWithNext: boolean)Sets whether this paragraph should be kept together with the next paragraph
on the same page during layout.
isFirstParagraphInColumn()booleanReturns whether this paragraph is the first in its column.
setFirstParagraphInColumn(firstParagraphInColumn: boolean)Sets whether this paragraph is the first in its column.
isInNewPage()booleanReturns whether this paragraph should start on a new page during layout.
setInNewPage(inNewPage: boolean)Sets whether this paragraph should start on a new page during layout.
getHyperlink()HyperlinkReturns the hyperlink attached to this paragraph (web, local or file
target), or {@code null} if the paragraph is not clickable.
setHyperlink(hyperlink: Hyperlink)Attaches a hyperlink to this paragraph.

See Also