Represents a link annotation that can navigate to a destination or perform an action.

from nutrient import PdfLinkAnnotation

Methods

set_border_style

def set_border_style(self, value: PdfBorderStyle) -> None

Parameters:

NameTypeDescription
valuePdfBorderStyle

set_border_width

def set_border_width(self, value: float) -> None

Parameters:

NameTypeDescription
valuefloat

set_color

def set_color(self, value: Color) -> None

Parameters:

NameTypeDescription
valueColor

set_contents

def set_contents(self, value: str) -> None

Parameters:

NameTypeDescription
valuestr

set_destination

def set_destination(self, page_number: int, x: Any, y: Any) -> None

Sets the link destination to navigate to a specific page in the document.

Parameters:

NameTypeDescription
page_numberintThe 1-based destination page number.
xAnyOptional X coordinate on the destination page. If null, the view scrolls to the top-left.
yAnyOptional Y coordinate on the destination page. If null, the view scrolls to the top-left.

set_is_hidden

def set_is_hidden(self, value: bool) -> None

Parameters:

NameTypeDescription
valuebool

set_is_printable

def set_is_printable(self, value: bool) -> None

Parameters:

NameTypeDescription
valuebool

set_rect

def set_rect(self, value: Any) -> None

Parameters:

NameTypeDescription
valueAny

set_title

def set_title(self, value: str) -> None

Parameters:

NameTypeDescription
valuestr

set_uri

def set_uri(self, value: str) -> None

Sets the URI for this link annotation. Setting a non-empty value creates a URI action; setting empty removes any existing action.

Parameters:

NameTypeDescription
valuestrThe value to set for the URI property.

Properties

border_style

@property
def border_style(self) -> PdfBorderStyle

Type: PdfBorderStyle

Read-only property.


border_width

@property
def border_width(self) -> float

Type: float

Read-only property.


color

@property
def color(self) -> Color

Type: Color

Read-only property.


contents

@property
def contents(self) -> str

Type: str

Read-only property.


destination_page_index

@property
def destination_page_index(self) -> int

Gets the 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

@property
def highlighting_mode(self) -> str

Gets the highlighting mode for the link.

Type: str

Read-only property.


index

@property
def index(self) -> int

Type: int

Read-only property.


is_hidden

@property
def is_hidden(self) -> bool

Type: bool

Read-only property.


is_printable

@property
def is_printable(self) -> bool

Type: bool

Read-only property.


modification_date

@property
def modification_date(self) -> str

Type: str

Read-only property.


name

@property
def name(self) -> str

Type: str

Read-only property.


rect

@property
def rect(self) -> Any

Type: Any

Read-only property.


sub_type

@property
def sub_type(self) -> str

Type: str

Read-only property.


title

@property
def title(self) -> str

Type: str

Read-only property.


uri

@property
def uri(self) -> str

Gets the URI for this link annotation. Setting a non-empty value creates a URI action; setting empty removes any existing action.

Type: str

Read-only property.