Link
Skip to main content

Merge PDF files

v2025.05

JPedal provides several methods to allow easy merging of PDFs into a single new file. This tool produces a single files containing all the pages from the provided files. The original file is left untouched by this process.

This feature is currently in preview as of version 2025.05
Preview features API are not finalised and may change. Preview features are available for users to test and provide feedback before they are released.

Merge two PDFs into a single file from the Command-Line or another language

java -cp jpedal.jar org.jpedal.tools.PdfMerge inputFile1.pdf inputFile2.pdf outputFile.pdf

Merge PDF files in Java

Static Convenience Methods

//Merge two files into a single file
PdfMerge.mergeFiles(new File("inputFile1.pdf"), new File("inputFile2.pdf"), new File("outputFile.pdf"));

//Merge an array of PDFs into a single file
PdfMerge.mergeFiles(new File[]{new File("inputFile.pdf"), ...}, new File("outputFile.pdf"));

Why JPedal?

  • Actively developed commercial library with full support and no third party dependencies.
  • Process PDF files up to 3x faster than alternative Java PDF libraries.
  • Simple licensing options and source code access for OEM users.

Learn more about JPedal

Start Your Free Trial


Customer Downloads

Select Download