Merge all PDF files contained in a folder as a new PDF document

Here is a sample java program showing how to merge all the PDF files contained in a folder as a new merged PDF document and save it to a new file. This program uses Qoppa’s library jPDFProcess. It can easily be adapted to use jPDFAssemble as well. // create a new PDF document PDFDocument mergePDF […]

Read More

Flatten & Merge 2 PDFs into 1 with Java

Here is a sample java program that uses Qoppa’s PDF library jPDFProcess to open two PDF files, flatten annotations and fields in each PDF document, then merge the two documents into one, and finally save the resulting merged document. // Load document 1 PDFDocument pdfDoc1 = new PDFDocument ("C:\\temp\\input1.pdf", null); // flatten annotations in document […]

Read More

Code Sample: Merge 2 PDF files into one in Java using jPDFAssemble

This Java program merges two PDF files into a single one using Qoppa’s library¬†jPDFAssemble. It is doing so by first opening the 2 PDFs and then appending the second one to the first one and saving the resulting document. // Load the two PDF documents PDFAssemble pdfDoc1 = new PDFAssemble ("doc1.pdf", null); PDFAssemble pdfDoc2 = […]

Read More