PopupAnnotation

PopupAnnotation

Overview

PopupAnnotation is a class in Aspose.PDF FOSS for Python. Inherits from: Annotation.

The window that shows another annotation’s contents (Popup).

This class declares 7 methods for PopupAnnotation objects in Python programs. Available methods include: __init__, add_popup, generate_appearance, get_property, reply, set_property, update_properties. Public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package. Properties: appearance_normal, author, contents, has_appearance, in_reply_to, parent_annotation, and 6 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.
in_reply_toAnnotation | NoneReadThe annotation this one replies to (/IRT), or None.
replieslist[Annotation]ReadEvery annotation on this page that replies to this one (/IRT).
popupAnnotation | NoneReadThe popup window this annotation owns (/Popup), or None.
parent_annotationAnnotation | NoneReadThe annotation a popup belongs to (/Parent), or None.

Methods

SignatureDescription
__init__(page: Page, index: int, data: dict[str, Any])Calls init(page, index, data) on this PopupAnnotation 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.
reply(contents: str, title: str | None, rect: tuple[float, float, float, float] | None, subtype: str, properties: dict[str, Any] | None) → AnnotationAdd an annotation replying to this one, and return it.
add_popup(rect: tuple[float, float, float, float] | None, is_open: bool) → AnnotationAdd this annotation’s popup window, linked both ways, and return it.
generate_appearance(force: bool) → boolSynthesise a normal appearance stream (/AP /N) for this annotation.

See Also