importjava.io.File;importjava.io.IOException;importorg.apache.pdfbox.pdmodel.PDDocument;importorg.apache.pdfbox.pdmodel.PDPage;publicclassAddingPagesToPdf{publicstaticvoidmain(String args[])throwsIOException{//Creating PDF document object PDDocument document =newPDDocument();File file =newFile("C:/pdfBox/AddPages.pdf");PDDocument.load(file);for(int i=0; i<10; i++){//Creating a blank page PDPage blankPage =newPDPage();//Adding the blank page to the document
document.addPage(blankPage);}//Saving the document
document.save("C:/pdfBox/AddPages_OP.pdf");System.out.println("PDF created");//Closing the document
document.close();}}