PageCollection
Overview
PageCollection is a class in Aspose.Pdf FOSS for Java.
Inherits from: Iterable<Page>.
Represents the collection of pages in a PDF document (ISO 32000-1:2008, §7.7.3.2).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
count | int | Read | Returns the number of pages. |
Methods
| Signature | Description |
|---|---|
PageCollection(pagesDict: COSDictionary, parser: PDFParser) | Creates a PageCollection wrapping the /Pages root dictionary. |
get(index: int) → Page | Returns the page at the given 1-based index. |
getCount() → int | Returns the number of pages. |
size() → int | Returns the number of pages (alias for {@link #getCount()}). |
iterator() → Iterator<Page> | Returns an iterator over all pages. |
accept(absorber: TextAbsorber) | Accepts a text absorber to extract text from all pages in this collection. |
accept(absorber: ImagePlacementAbsorber) | Accepts an image placement absorber to find images on all pages. |
add() → Page | Creates a new page with standard A4 page bounds [0 0 595 842], adds it to the |
| end of this collection, and returns it. | |
add(page: Page) | Adds an existing page to the end of this collection. |
add(otherPages: PageCollection) | Adds all pages from another PageCollection to the end of this collection. |
insert(index: int) → Page | Inserts a new blank page (A4) at the given 1-based index and returns it. |
insert(index: int, page: Page) | Inserts a page at the given 1-based index. |
clear() | Removes all pages from the document. |
delete(index: int) | Removes the page at the given 1-based index. |