Home » PDFBox Environment Setup

PDFBox Environment Setup

by Online Tutorials Library

PDFBox Environment Setup

PDFBox Installation

To install PDFBox, perform the following steps-

Step 1. Open the Homepage of Apache PDFBox.

https://pdfbox.apache.org/
PDFBox Environment Setup

Step 2. Click on Download link. PDFBox download page is shown in the following screenshots.

PDFBox Environment Setup

Step 3. In the download page, click on the latest release. For Instance, we choose PDFBox 2.0.9. Click on this release, we will be directed to the required JAR files as shown in the following screenshots.

PDFBox Environment Setup

Step 4. Download the following JAR files pdfbox-app-2.0.9.jar, pdfbox-2.0.9.jar, fontbox-2.0.9.jar, preflight-2.0.9.jar, xmpbox-2.0.9.jar and, pdfbox-tools-2.0.9.jar.

PDFBox Installation in Eclipse

The downloaded JAR files is required to embed into the Eclipse environment. We can do this by setting the build path and by using the pom.xml file.

Follow the below steps to install PDFBox in Eclipse-

Step 1. Open Eclipse IDE. Go to File->New->Java Project.

Step 2. A new Java Project Wizard will open. Fill the details and click Next.

PDFBox Environment Setup

Step 3. A new Java Project is created. Right click on this Project and select Build Path->Configure Build path. Following screen will open.

PDFBox Environment Setup

Step 4. Click Add External JARs. Select the JAR file which we had downloaded above and click Ok.

PDFBox Environment Setup

Step 5. After clicking Ok button, the JAR file will be added in our Library as shown in the following screenshot.

PDFBox Environment Setup

Step 6. Once we click Ok, JAR file successfully added in the current project. We can verify these libraries by expanding the Referenced Libraries as shown in the following screenshot.

PDFBox Environment Setup

Using pom.xml

1. Convert the Java Project into Maven Project. To do this, Right click on the Project -> Submenu Configure -> Convert to Maven Project.

PDFBox Environment Setup

2. Add the following components to its pom.xml.

You may also like