LinkAnnotation

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

NameTypeAccessDescription
subtypestrReadGets the subtype.
contentsstrRead/WriteGets or sets the contents.
recttuple[float, float, float, float]Read/WriteGets or sets the rect.
titlestrRead/WriteGets or sets the title.
authorstrRead/WriteGets or sets the author.
has_appearanceboolReadGets the has appearance.
appearance_normalbytesRead/WriteGets or sets the appearance normal.
propertiesdict[str, Any]ReadType-specific annotation entries beyond the common fields.
colortuple[float, ...]Read/WriteAnnotation colour (/C) as a component tuple, empty when unset.

Methods

SignatureDescription
__init__(page: Page, index: int, data: dict[str, Any])Calls init(page, index, data) on this LinkAnnotation instance.
get_property(name: str, default: Any)AnyReturn 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)boolSynthesise a normal appearance stream (/AP /N) for this annotation.

See Also