Skip to content
Guides

Insert Pages

Insert a blank page or pages from other PDFs into the target document.

Insert Blank Pages

This example shows how to insert a blank page:

C#
int pageIndex = 1; // Insert after the first page.
int pageWidth = 595;
int pageHeight = 842;
// The `InsertPage` method allows specifying an image path, and when the image path is empty, it inserts a blank page.
document.InsertPage(pageIndex, pageWidth, pageHeight, "");

Insert Pages from other PDFs

This example shows how to insert pages from other PDFs:

C#
CPDFDocument documentForInsert = CPDFDocument.InitWithFilePath("OtherPDF.pdf");
document.ImportPagesAtIndex(documentForInsert, "1", 1);