[]
A collection of Page objects that make up a PDF document.
public class PageCollection : Collection<Page>, IList<Page>, ICollection<Page>, IList, ICollection, IReadOnlyList<Page>, IReadOnlyCollection<Page>, IEnumerable<Page>, IEnumerable
Gets the GcPdfDocument object owning this PageCollection collection.
public GcPdfDocument Doc { get; }
Gets the last page in the collection.
public Page Last { get; }
Creates a new Page and adds it to the end of the document.
public Page Add()
The newly created page.
The size of the new page is determined by the PageSize property of the parent document.
You can also add pages to a GcPdfDocument by calling the NewPage() method.
public Page Add(PaperKind paperKind)
The newly created page.
You can also add pages to a GcPdfDocument by calling the NewPage() method.
Creates a new Page with the specified size and adds it to the end of the document.
public Page Add(SizeF pageSize)
pageSize
System.Drawing.SizeFThe size of the new page, in points.
The newly created page.
You can also add pages to a GcPdfDocument by calling the NewPage() method.
protected override void ClearItems()
Clones a page at a specified index (sourceIndex
) and inserts it
at a specified position (destinationIndex
).
public void ClonePage(int sourceIndex, int destinationIndex, bool cloneAnnotations = true, bool cloneFields = true)
sourceIndex
intThe index of the page to clone.
destinationIndex
intThe destination index.
cloneAnnotations
boolIndicates whether to clone page annotations.
cloneFields
boolIndicates whether to clone fields existing on the source page.
Creates a new page with the specified size and inserts it at a specific position in the document.
public Page Insert(int index, PaperKind paperKind)
index
intThe position where the new page will be inserted.
paperKind
PaperKindThe size of the new page, expressed as a PaperKind.
The newly created page.
Creates a new page with the specified size and inserts it at a specific position in the document.
public Page Insert(int index, SizeF pageSize)
index
intThe position where the new page will be inserted.
pageSize
System.Drawing.SizeFThe size of the new page, expressed in points.
The newly created page.
Creates a new page and inserts it at a specific position in the document.
public Page Insert(int index)
index
intThe position where the new page will be inserted.
The newly created page.
The size of the new page is determined by the PageSize property of the parent document.
protected override void InsertItem(int index, Page item)
index
intitem
PageMoves a page specified by its 0-based index to another position in the collection.
public void Move(int curIndex, int newIndex)
curIndex
intThe current index of the page to move.
newIndex
intThe new index of the page.
protected override void RemoveItem(int index)
index
intprotected override void SetItem(int index, Page item)
index
intitem
PageSwaps two pages specified by their 0-based indices.
public void Swap(int index1, int index2)
index1
intThe index of the first page to swap.
index2
intThe index of the second page to swap.