

Before you click the Merge button, set the document order before you merge PDF files. Use the Combine Files window to define the correct order in which to merge the documents. Then, select files to be combined, click the More button in the top panel, and select Merge. First, upload or create multiple PDF documents that you intend to merge.

Save this code in a file with name MergePDFs.java. Instructions and Help about merge pdf files. Combine PDF files to share information in a single file with Adobe Acrobat online services.
Here, we will merge the PDF documents named sample1.pdf and sample2.pdf in to a single PDF document merged.pdf.
Merge pdf multiple files how to#
This example demonstrates how to merge the above PDF documents. Suppose, we have two PDF documents - sample1.pdf and sample2.pdf, in the path C:\PdfBox_Examples\ as shown below. Welcome to a free, online tool for merging (combining) multiple PDF files into one. Merge the documents using the mergeDocuments() method of the PDFmerger class as shown below. Set the source files using the addSource() method as shown below.įile file = new File("path of the document") tDestinationFileName("C:/PdfBox_Examples/data1/merged.pdf") Set the destination files using the setDestinationFileName() method as shown below. PDFMergerUtility PDFmerger = new PDFMergerUtility() Instantiate the merge utility class as shown below. Step 1: Instantiating the PDFMergerUtility class You can merge multiple PDF documents into a single PDF document using the class named PDFMergerUtility class, this class provides methods to merge two or more PDF documents in to a single PDF document.įollowing are the steps to merge multiple PDF documents. Let us now learn how to merge multiple PDF documents as a single document. In the previous chapter, we have seen how to split a given PDF document into multiple documents.
