[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.PageCollection

Class PageCollection

Namespace
GrapeCity.Documents.Pdf
Assembly
GcDocs.Pdf.dll

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
Inheritance
object
System.Collections.ObjectModel.Collection<T><Page>
PageCollection
Implements
System.Collections.Generic.IList<T><Page>
System.Collections.Generic.ICollection<T><Page>
System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IReadOnlyList<T><Page>
System.Collections.Generic.IReadOnlyCollection<T><Page>
System.Collections.Generic.IEnumerable<T><Page>
System.Collections.IEnumerable
Inherited Members
System.Collections.ObjectModel.Collection<GrapeCity.Documents.Pdf.Page>.Add(GrapeCity.Documents.Pdf.Page)
System.Collections.ObjectModel.Collection<GrapeCity.Documents.Pdf.Page>.Clear()
System.Collections.ObjectModel.Collection<GrapeCity.Documents.Pdf.Page>.CopyTo(GrapeCity.Documents.Pdf.Page[], int)
System.Collections.ObjectModel.Collection<GrapeCity.Documents.Pdf.Page>.Contains(GrapeCity.Documents.Pdf.Page)
System.Collections.ObjectModel.Collection<GrapeCity.Documents.Pdf.Page>.GetEnumerator()
System.Collections.ObjectModel.Collection<GrapeCity.Documents.Pdf.Page>.IndexOf(GrapeCity.Documents.Pdf.Page)
System.Collections.ObjectModel.Collection<GrapeCity.Documents.Pdf.Page>.Insert(int, GrapeCity.Documents.Pdf.Page)
System.Collections.ObjectModel.Collection<GrapeCity.Documents.Pdf.Page>.Remove(GrapeCity.Documents.Pdf.Page)
System.Collections.ObjectModel.Collection<GrapeCity.Documents.Pdf.Page>.RemoveAt(int)
System.Collections.ObjectModel.Collection<GrapeCity.Documents.Pdf.Page>.Count
System.Collections.ObjectModel.Collection<GrapeCity.Documents.Pdf.Page>.Items
System.Collections.ObjectModel.Collection<GrapeCity.Documents.Pdf.Page>.this[int]
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

Doc

Gets the GcPdfDocument object owning this PageCollection collection.

public GcPdfDocument Doc { get; }

Property Value

GcPdfDocument

Last

Gets the last page in the collection.

public Page Last { get; }

Property Value

Page

Methods

Add()

Creates a new Page and adds it to the end of the document.

public Page Add()

Returns

Page

The newly created page.

Remarks

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.

Add(PaperKind)

Creates a new Page of the specified PaperKind and adds it to the end of the document.

public Page Add(PaperKind paperKind)

Parameters

paperKind PaperKind

The PaperKind determining the size of the new page.

Returns

Page

The newly created page.

Remarks

You can also add pages to a GcPdfDocument by calling the NewPage() method.

Add(SizeF)

Creates a new Page with the specified size and adds it to the end of the document.

public Page Add(SizeF pageSize)

Parameters

pageSize System.Drawing.SizeF

The size of the new page, in points.

Returns

Page

The newly created page.

Remarks

You can also add pages to a GcPdfDocument by calling the NewPage() method.

ClearItems()

protected override void ClearItems()

ClonePage(int, int, bool, bool)

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)

Parameters

sourceIndex int

The index of the page to clone.

destinationIndex int

The destination index.

cloneAnnotations bool

Indicates whether to clone page annotations.

cloneFields bool

Indicates whether to clone fields existing on the source page.

Insert(int, PaperKind)

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)

Parameters

index int

The position where the new page will be inserted.

paperKind PaperKind

The size of the new page, expressed as a PaperKind.

Returns

Page

The newly created page.

Insert(int, SizeF)

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)

Parameters

index int

The position where the new page will be inserted.

pageSize System.Drawing.SizeF

The size of the new page, expressed in points.

Returns

Page

The newly created page.

Insert(int)

Creates a new page and inserts it at a specific position in the document.

public Page Insert(int index)

Parameters

index int

The position where the new page will be inserted.

Returns

Page

The newly created page.

Remarks

The size of the new page is determined by the PageSize property of the parent document.

InsertItem(int, Page)

protected override void InsertItem(int index, Page item)

Parameters

index int
item Page

Move(int, int)

Moves a page specified by its 0-based index to another position in the collection.

public void Move(int curIndex, int newIndex)

Parameters

curIndex int

The current index of the page to move.

newIndex int

The new index of the page.

RemoveItem(int)

protected override void RemoveItem(int index)

Parameters

index int

SetItem(int, Page)

protected override void SetItem(int index, Page item)

Parameters

index int
item Page

Swap(int, int)

Swaps two pages specified by their 0-based indices.

public void Swap(int index1, int index2)

Parameters

index1 int

The index of the first page to swap.

index2 int

The index of the second page to swap.