Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. //Creating PDF document object
  2. PDDocument document = new PDDocument();
  3.  
  4. for (int i=0; i<10; i++) {
  5. //Creating a blank page
  6. PDPage blankPage = new PDPage();
  7.  
  8. //Adding the blank page to the document
  9. document.addPage( blankPage );
  10. }
  11.  
  12. //Saving the document
  13. document.save("C:/PdfBox_Examples/my_doc.pdf");
  14. System.out.println("PDF created");
  15.  
  16. //Closing the document
  17. document.close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement