On this page
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:
java
CPDFDocument document = new CPDFDocument();
document.open(pdfPath);
int pageIndex = 1; // Insert after the first page.
float pageWidth = 595F;
float pageHeight = 842F;
document.insertBlankPage(pageIndex, pageWidth, pageHeight);
Insert Pages from other PDFs
This example shows how to insert pages from other PDFs:
java
CPDFDocument document2 = new CPDFDocument();
document2.open(pdfPath);
document.importPages(document2, new int[]{0}, 1);