[]
        
(Showing Draft Content)

C1.Pdf.PdfPageCollection.Insert

Insert Method

Insert(int, PdfPage)

Inserts a page at a specific position in the document.

Declaration
public void Insert(int index, PdfPage page)
Parameters
Type Name Description
int index

Position where the new page will be inserted in the document.

PdfPage page

PdfPage to add to the document.

Remarks
<p>Since the <xref href="C1.Pdf.PdfPage" data-throw-if-not-resolved="false"></xref> class has no public constructors, the only 

way to use this overload is to remove an existing page from the document first, then add that page back into the document.

Each page can appear only once in the document. Trying to add the same page twice will throw an exception.

Insert(int)

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

Declaration
public void Insert(int index)
Parameters
Type Name Description
int index

The position where the new page will be inserted.

Remarks
<p>The size of the new page is determined by the <xref href="C1.Pdf.C1PdfDocument.PageSize" data-throw-if-not-resolved="false"></xref> property 

of the parent document.

The new page becomes current after it is added to the document (see the CurrentPage property).

Insert(int, SizeF)

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

Declaration
public void Insert(int index, SizeF pageSize)
Parameters
Type Name Description
int index

The position where the new page will be inserted.

SizeF pageSize

The size of the new page, expressed in points.

Insert(int, PaperKind)

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

Declaration
public void Insert(int index, PaperKind paperKind)
Parameters
Type Name Description
int index

The position where the new page will be inserted.

PaperKind paperKind

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