OptionalContent

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

NameTypeAccessDescription
presentboolReadTrue when the document declares any optional content group.
groupslist[OptionalContentGroup]ReadGets the groups.
visible_by_numberdict[int, bool]ReadGets the visible by number.

Methods

SignatureDescription
__init__(pdf: Any)Calls init(pdf) on this OptionalContent instance.
is_visible(oc: Any)boolReturn 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.