PdfLinkAnnotation
Represents a link annotation that can navigate to a destination or perform an action.
from nutrient_sdk import PdfLinkAnnotationInherits from: PdfAnnotation
Construction
PdfLinkAnnotation cannot be instantiated directly. Obtain instances through static factory methods or via other SDK classes.
Methods
set_destination
def set_destination(self, page_number: int, x: Optional[float], y: Optional[float]) -> NoneSets the link destination to navigate to a specific page in the document.
Parameters:
| Name | Type | Description |
|---|---|---|
page_number | int | The 1-based destination page number. |
x | Optional[float] | Optional X coordinate on the destination page. If null, the view scrolls to the top-left. |
y | Optional[float] | Optional Y coordinate on the destination page. If null, the view scrolls to the top-left. |
Properties
destination_page_index
@propertydef destination_page_index(self) -> intThe destination page index (0-based) if this link has an internal page destination. Returns -1 if no page destination is found.
Type: int
Read-only property.
highlighting_mode
@propertydef highlighting_mode(self) -> strThe highlighting mode for the link.
Type: str
Read-only property.
uri
@propertydef uri(self) -> str
@uri.setterdef uri(self, value: str) -> NoneThe URI for this link annotation. Setting a non-empty value creates a URI action; setting empty removes any existing action.
Type: str
Inherited members
From PdfAnnotation: blend_mode, border_effect, border_effect_intensity, border_style, border_width, color, contents, index, is_hidden, is_printable, modification_date, name, rect, sub_type, title