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 work, he’s a 1900‑rated chess player, guitarist, and French learner.

How to Duplicate Pages in a PDF in Java (Tutorial)

50 sec read

duplicate page

Sometimes you might want to duplicate pages in a PDF. For example, when filling in multiple copies of a form. Our Java PDF toolkit, JPedal, makes this an easy task.

In this post I will show you the three simple steps of duplicating pages using JPedal.

1. Download JPedal

You can download a JPedal trial jar here.

2. Add to your project

For this example, I am going to use Maven. If you want to use another build system, check out the setup page on our support site.

Install the downloaded jar to your local Maven repository:

mvn install:install-file -Dfile= -DgroupId=com.idrsolutions -Dpackaging=jar -DartifactId=jpedal -Dversion=1.0

Add the following to your pom.xml file:

3. Add to your code

Create an instance of PDF Manipulator and call the copy page method.

Learn more about the PDF Manipulator API.

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 work, he’s a 1900‑rated chess player, guitarist, and French learner.