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
| 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. |
in_reply_to | Annotation | None | Read | The annotation this one replies to (/IRT), or None. |
replies | list[Annotation] | Read | Every annotation on this page that replies to this one (/IRT). |
popup | Annotation | None | Read | The popup window this annotation owns (/Popup), or None. |
parent_annotation | Annotation | None | Read | The annotation a popup belongs to (/Parent), or None. |
Methods
| Signature | Description |
|---|---|
__init__(page: Page, index: int, data: dict[str, Any]) | Calls init(page, index, data) on this PopupAnnotation 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. |
reply(contents: str, title: str | None, rect: tuple[float, float, float, float] | None, subtype: str, properties: dict[str, Any] | None) → Annotation | Add an annotation replying to this one, and return it. |
add_popup(rect: tuple[float, float, float, float] | None, is_open: bool) → Annotation | Add this annotation’s popup window, linked both ways, and return it. |
generate_appearance(force: bool) → bool | Synthesise a normal appearance stream (/AP /N) for this annotation. |