LayerCollection

LayerCollection

Overview

LayerCollection is a class in Aspose.PDF FOSS for Python.

The document’s layers, indexable by position or by name.

This class declares 4 methods for LayerCollection objects in Python programs. Available methods include: __init__, add, names, remove. All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package.

Methods

SignatureDescription
__init__(state: Any)Calls init(state) on this LayerCollection instance.
add(name: str, visible: bool, intent: Sequence[str])LayerCreate a layer and return it.
remove(layer: Layer | str)boolRemove a layer, leaving its content unconditionally visible.
names()list[str]Layer names in document order.