Class PageCollection
The ordered collection of pages in a Document.
Backed by the document's internal page tree.
Inheritance
PageCollection
Assembly: DRIT.Pdf.dll
Syntax
public sealed class PageCollection : IEnumerable<Page>, IEnumerable
Properties
Count
Gets the number of pages in the document.
Declaration
public int Count { get; }
Property Value
this[int]
Gets the page at the specified zero-based index.
Declaration
public Page this[int index] { get; }
Parameters
| Type |
Name |
Description |
| int |
index |
The zero-based page index.
|
Property Value
Exceptions
Kids
Page-tree children operations for the root page-tree node.
Declaration
public PageTreeKidCollection Kids { get; }
Property Value
Rotate
Root page-tree rotation inherited by pages created through
Kids operations.
Declaration
public int Rotate { get; set; }
Property Value
Methods
Add()
Add a new blank A4 page to the end of the document.
Declaration
Returns
Add(PdfSize)
Add a new blank page with a standard size.
Declaration
public Page Add(PdfSize size)
Parameters
Returns
Add(double, double)
Add a new blank page with the given dimensions (in points).
Declaration
public Page Add(double width, double height)
Parameters
Returns
AddClone(Page)
Deep-copy a page from another document and append it to this collection.
All resources (fonts, images, XObjects, ExtGStates, etc.) are recursively
copied and renumbered into this document's object namespace.
The source page's Content must have been finalized
(i.e. the document must have been saved at least once, or the source page
content stream must already be attached).
Declaration
public Page AddClone(Page sourcePage)
Parameters
| Type |
Name |
Description |
| Page |
sourcePage |
|
Returns
AddClone(PageCollection)
Appends deep clones of all pages from sourcePages.
Declaration
public void AddClone(PageCollection sourcePages)
Parameters
GetEnumerator()
Returns an enumerator that iterates through the pages in the collection.
Declaration
public IEnumerator<Page> GetEnumerator()
Returns
InsertClone(int, PageCollection)
Inserts deep clones of all pages from sourcePages
starting at index.
Declaration
public void InsertClone(int index, PageCollection sourcePages)
Parameters
RemoveAt(int)
Removes the page at index.
Declaration
public void RemoveAt(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
|
SetMediaBox(double, double, double, double)
Sets the root page-tree media box inherited by pages created through
Kids operations.
Declaration
public void SetMediaBox(double left, double bottom, double right, double top)
Parameters
Implements