PageCollection

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

NameTypeAccessDescription
PageCollectionPageCollectionReadGets the page collection.

Methods

SignatureDescription
PageCollection()PageCollectionCalls PageCollection on this PageCollection instance.
PageCollection()PageCollection
PageCollection()
PageCollection()
~PageCollection()Calls ~PageCollection on this PageCollection instance.
Count()std::size_tReturns the total number of pages in the document as a std::size_t
Add()PageReturns a Page object that can be configured before saving the document
Add(page: Page)PageCalls Add(page) on this PageCollection instance.
Insert(pageNumber: int)PageCreates a new blank page at the given 1‑based index, shifting subsequent pages forward
Insert(pageNumber: int, page: Page)PageCalls 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.

See Also