PageCollection
Overview
PageCollection is a class in Aspose.PDF FOSS for C++.
The PageCollection class provides methods to add a new blank page, insert a page at a specific position, and delete pages by number or range.
This class provides 13 methods for working with PageCollection objects in C++ programs.
Available methods include: Add, Count, Delete, Insert, PageCollection, ~PageCollection.
All public members are accessible to any C++ application after installing the Aspose.PDF FOSS for C++ package.
Accessor methods: PageCollection.
Accessor Methods
| Name | Type | Access | Description |
|---|---|---|---|
PageCollection | PageCollection | Read | Gets the page collection. |
Methods
| Signature | Description |
|---|---|
PageCollection() → PageCollection | Calls PageCollection on this PageCollection instance. |
PageCollection() → PageCollection | |
PageCollection() | |
PageCollection() | |
~PageCollection() | Calls ~PageCollection on this PageCollection instance. |
Count() → std::size_t | Returns the total number of pages in the document as a std::size_t |
Add() → Page | Returns a Page object that can be configured before saving the document |
Add(page: Page) → Page | Calls Add(page) on this PageCollection instance. |
Insert(pageNumber: int) → Page | Creates a new blank page at the given 1‑based index, shifting subsequent pages forward |
Insert(pageNumber: int, page: Page) → Page | Calls Insert(pageNumber, page) on this PageCollection instance. |
Delete() | Removes the page at the given index |
Delete(pageNumber: int) | Calls Delete(pageNumber) on this PageCollection instance. |
Delete(pageNumbers: std::vector<int>) | Calls Delete(pageNumbers) on this PageCollection instance. |