Jacob Collins Jacob is the JPedal Product Lead and specialises in PDF creation and manipulation. He also develops Salesforce backend systems and contributes to marketing and support. Outside of work, he’s a 1900‑rated chess player, guitarist, and French learner.

New options for our PDF merger

1 min read

merge pdf files

In the latest release of our PDF library JPedal, we added some new features to our PDF merging tool. These new settings allow for greater control over the output when merging two or more PDF files.

How to use each new feature

First, you will need to create a list of MergeOptions and add each option to the list.

Then you can call PdfMerge.mergeFiles() and pass the options list.

 

Add a dividing page

To add a blank page in between each input document, you can use MergeOption.ADD_DIVIDING_PAGE.

Add a footer

To add a footer to all pages which includes the original filename and page number, you can use MergeOption.ADD_FOOTER.

You can customise the appearance of the footer using PdfMergeAttributes.

Interleave

To merge documents by alternating pages from each input document, you can use MergeOption.INTERLEAVE.

Learn more about interleave merging.

Normalize page size

To ensure all pages in the output document are the same dimensions as the first page, you can use MergeOption.NORMALISE_PAGE_SIZE_TO_MATCH_FIRST.

Normalize page rotation

To ensure all pages in the output document have the same orientation as the first page, you can use MergeOption.NORMALISE_ROTATION_TO_MATCH_FIRST.

 

Download JPedal to get started

Download a JPedal jar from our website to instantly start merging PDF files.

Resources

Learn more about how to merge PDFs in Java.

We can help you better understand the PDF format as developers who have been working with the format for more than 2 decades!



The JPedal PDF library allows you to solve these problems in Java


Jacob Collins Jacob is the JPedal Product Lead and specialises in PDF creation and manipulation. He also develops Salesforce backend systems and contributes to marketing and support. Outside of work, he’s a 1900‑rated chess player, guitarist, and French learner.

Automating HEIC Conversion: How JDeli Eliminates Manual Steps

In the world of claims processing and expense reporting, the device in your customer’s pocket is often more advanced than the software running on...
Amy Pearson
2 min read