LinkAnnotation
Overview
LinkAnnotation is a class in Aspose.PDF FOSS for Python.
Inherits from: Annotation.
Concrete annotation type kept for compatibility with tests/API.
This class provides 5 methods for working with LinkAnnotation objects in Python programs.
Available methods include: __init__, generate_appearance, get_property, set_property, update_properties.
All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package.
Properties: appearance_normal, author, color, contents, has_appearance, properties, and 3 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
subtype | str | Read | Gets the subtype. |
contents | str | Read/Write | Gets or sets the contents. |
rect | tuple[float, float, float, float] | Read/Write | Gets or sets the rect. |
title | str | Read/Write | Gets or sets the title. |
author | str | Read/Write | Gets or sets the author. |
has_appearance | bool | Read | Gets the has appearance. |
appearance_normal | bytes | Read/Write | Gets or sets the appearance normal. |
properties | dict[str, Any] | Read | Type-specific annotation entries beyond the common fields. |
color | tuple[float, ...] | Read/Write | Annotation colour (/C) as a component tuple, empty when unset. |
Methods
| Signature | Description |
|---|---|
__init__(page: Page, index: int, data: dict[str, Any]) | Calls init(page, index, data) on this LinkAnnotation instance. |
get_property(name: str, default: Any) → Any | Return a single type-specific property value (or default). |
set_property(name: str, value: Any) | Set a single type-specific property (value=None removes it). |
update_properties() | Set several type-specific properties at once. |
generate_appearance(force: bool) → bool | Synthesise a normal appearance stream (/AP /N) for this annotation. |