PageCollection
Overview
PageCollection is a class in Aspose.PDF FOSS for Python.
A collection to manage PDF pages within a Document.
This class provides 10 methods for working with PageCollection objects in Python programs.
Available methods include: Delete, __init__, add, clear, contains, delete, get_enumerator, index_of, insert, item.
All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package.
Methods
| Signature | Description |
|---|---|
__init__(document: Document) | Create a new collection. |
item(index: int) → Page | Legacy accessor mirroring the original Item method. |
get_enumerator() → Iterator[Page] | Legacy iterator name - returns an iterator over the pages. |
add(page: Page | Any | None) → Page | Append a page to the collection. |
insert(index: int, page: Page | Any | None) → Page | Insert a page at index. |
delete(index: int) | Delete the page at index. |
Delete(index: int) | Public API alias for :meth:delete. |
clear() | Remove all pages from the collection. |
contains(page: Page) → bool | Return True if page is present in the collection. |
index_of(page: Page) → int | Return the zero-based index of page in the collection. |