The aim of this program is to merge two pdfs and create a new pdf which contains the contents of the first and second pdfs in order.
- Apache PDFBox - PDFMergerUtility class was used mainly for the merging function.
-
Add the Apache PDFBox dependency to your IDE from here
-
Without IDE, follow the steps given in this LINK
Run the Merge2PDFFiles project in Intellij/Any other IDE supporting Java
Enter first pdf name(without extension): $(pdf1)
Enter second pdf name(without extension): $(pdf2)
Enter destination fileName(without extension): $(MergedPdf)
Documents Successfully Merged!
<Sample input and output files present in the files itself>