PDFBox: Merging two documents


/ Published in: Java
Save to your folder(s)

Creates a new PDF by merging two existing PDF's


Copy this code and paste it in your HTML
  1. /**
  2.  * @param args the command line arguments
  3.  * @throws java.io.IOException
  4.  */
  5. public static void main(String[] args) throws IOException {
  6. PDFMergerUtility merger = new PDFMergerUtility();
  7.  
  8. merger.setDestinationFileName("");
  9.  
  10. merger.addSource(new File(""));
  11. merger.addSource(new File(""));
  12.  
  13. merger.mergeDocuments();
  14. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.