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)}).

This class provides 6 methods for working with LocalHyperlink objects in Java programs. Available methods include: LocalHyperlink, getTarget, getTargetPageNumber, setTarget, setTargetPageNumber. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package. Properties: target, targetPageNumber.

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

 English