How to Merge PDF Files
Below are the steps and sample code to merge PDF files with and without options.
Steps to Merge PDFs
- Create a
MergeDocument object using the static
Merge method, passing in two PDFs to be merged.
- Call the
Draw method to save the merged PDF.
Sample code - Java
MergeDocument document = MergeDocument.Merge("C:\\DocumentA.pdf", "C:\\DocumentB.pdf");
If you have additional PDFs to merge, you can append them by calling the
Sample code with Append - Java
MergeDocument document = new MergeDocument("C:\\DocumentA.pdf");
document.append("C:\\Append DocB.pdf", 1, 2);
DynamicPDF Merger Information
More information can be found here:
Available in Other Platforms
DynamicPDF Merger PDF Library is available for Java and COM/AxtiveX platforms. Refer to the respective product pages for more details.