LocalHyperlink

LocalHyperlink

Overview

LocalHyperlink is a class in Aspose.Pdf FOSS for Java. Inherits from: Hyperlink.

Hyperlink to another location inside the same document — either a target {@link BaseParagraph} (set via {@link #setTarget(BaseParagraph)}) or a specific 1-based page number ({@link #setTargetPageNumber(int)}).

Properties

NameTypeAccessDescription
targetBaseParagraphRead@return the linked paragraph, or {@code null} if a page-number link is used instead
targetPageNumberintRead@return the 1-based target page number, or {@code 0} if a paragraph target is used instead

Methods

SignatureDescription
LocalHyperlink()Creates an empty local hyperlink.
LocalHyperlink(target: BaseParagraph)Creates a local hyperlink pointing at a paragraph anchor inside the same document.
getTarget()BaseParagraph@return the linked paragraph, or {@code null} if a page-number link is used instead
setTarget(target: BaseParagraph)Sets the paragraph anchor this link should jump to.
getTargetPageNumber()int@return the 1-based target page number, or {@code 0} if a paragraph target is used instead
setTargetPageNumber(targetPageNumber: int)Sets the page number this link should jump to (1-based).

See Also