OptionalContent
Overview
OptionalContent is a class in Aspose.PDF FOSS for Python.
The document’s optional content groups and their default visibility.
This class declares 3 methods for OptionalContent objects in Python programs.
Available methods include: __init__, is_visible, set_visible.
All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package.
Properties: groups, present, visible_by_number.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
present | bool | Read | True when the document declares any optional content group. |
groups | list[OptionalContentGroup] | Read | Gets the groups. |
visible_by_number | dict[int, bool] | Read | Gets the visible by number. |
Methods
| Signature | Description |
|---|---|
__init__(pdf: Any) | Calls init(pdf) on this OptionalContent instance. |
is_visible(oc: Any) → bool | Return whether content tagged with oc is shown. |
set_visible(object_number: int, visible: bool) | Set a group’s visibility in memory and in the default configuration. |