[]
        
(Showing Draft Content)

C1.C1Pdf.PdfPageCollection.Add

Add Method

Add(PdfPage)

Adds a page to the document.

Declaration
public int Add(PdfPage page)
Parameters
Type Name Description
PdfPage page

PdfPage to add to the document.

Returns
Type Description
int

The index of the new page in the document.

Remarks

Since the PdfPage 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.

Add()

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

Declaration
public int Add()
Returns
Type Description
int

The index of the new page.

Remarks

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

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

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

Add(SizeF)

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

Declaration
public int Add(SizeF pageSize)
Parameters
Type Name Description
SizeF pageSize

The size of the new page, in points.

Returns
Type Description
int

The index of the new page.

Remarks

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

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

Add(PaperKind)

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

Declaration
public int Add(PaperKind paperKind)
Parameters
Type Name Description
PaperKind paperKind

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

Returns
Type Description
int

The index of the new page.

Remarks

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

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