LinkAnnotation

Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation

public final class LinkAnnotation extends Annotation

Represents either a hypertext link to a destination elsewhere in the document or an action to be performed.

Constructors

ConstructorDescription
LinkAnnotation(Page page, Rectangle rect)Creates new Link annotation on the specified page.

Methods

MethodDescription
getAction()Get an action to be performed when the link annotation is activated.
setAction(PdfAction value)Set an action to be performed when the link annotation is activated.
getDestination()Get a destination to be displayed when the annotation is activated.
setDestination(IAppointment value)Set a destination to be displayed when the annotation is activated.
accept(AnnotationSelector visitor)Accepts visitor object to process the annotation.
getHighlighting()Get the visual effect to be used when the mouse button is pressed or held down inside its active area.
setHighlighting(int value)Set the visual effect to be used when the mouse button is pressed or held down inside its active area.
getAnnotationType()Gets type of annotation.

LinkAnnotation(Page page, Rectangle rect)

public LinkAnnotation(Page page, Rectangle rect)

Creates new Link annotation on the specified page.

Parameters:

ParameterTypeDescription
pagePageThe document’s page where annotation should be created.
rectRectangleThe annotation rectangle, defining the location of the annotation on the page.

getAction()

public PdfAction getAction()

Get an action to be performed when the link annotation is activated.

Returns: PdfAction - PdfAction value

setAction(PdfAction value)

public void setAction(PdfAction value)

Set an action to be performed when the link annotation is activated.

Parameters:

ParameterTypeDescription
valuePdfActionPdfAction object

getDestination()

public IAppointment getDestination()

Get a destination to be displayed when the annotation is activated.

Returns: IAppointment - IAppointment value

setDestination(IAppointment value)

public void setDestination(IAppointment value)

Set a destination to be displayed when the annotation is activated.

Parameters:

ParameterTypeDescription
valueIAppointmentIAppointment object

accept(AnnotationSelector visitor)

public void accept(AnnotationSelector visitor)

Accepts visitor object to process the annotation.

Parameters:

ParameterTypeDescription
visitorAnnotationSelectorVisitor object.

getHighlighting()

public int getHighlighting()

Get the visual effect to be used when the mouse button is pressed or held down inside its active area.

Returns: int - HighlightingMode element

setHighlighting(int value)

public void setHighlighting(int value)

Set the visual effect to be used when the mouse button is pressed or held down inside its active area.

Parameters:

ParameterTypeDescription
valueintHighlightingMode element

getAnnotationType()

public AnnotationType getAnnotationType()

Gets type of annotation.

Returns: AnnotationType - AnnotationType element