Applying Licenses to Projects in IronPDF for Java

Get Your License Key

An IronPDF license key allows you to deploy your project live without any IronPDF licensing watermarks.

Licenses start at just $749 and include one free year of support and updates.

You can also try IronPDF free for 30 days with a trial license key.

Step 1: Define IronPDF as a Java Dependency

Option 1: pom.xml Dependency

To define IronPDF as a dependency, please add the following to your pom.xml:

<dependencies>

<!--Adds IronPDF Java. Use the latest version in the version tag.-->
    <dependency>
        <groupId>com.ironsoftware</groupId>
        <artifactId>ironpdf</artifactId>
        <version>20xx.xx.xxxx</version>
    </dependency>

<!--Adds the slf4j logger which IronPDF Java uses.-->
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>2.0.3</version>
    </dependency>

</dependencies>
XML

Option 2: Download the jar file

Optionally download the jar file manually from https://search.maven.org/artifact/com.ironsoftware/ironpdf

Step 2: Apply Your License Key

Option 1: Apply license key in Java code

Add this code to the startup of your application, before IronPDF is used. This method is universally effective and straightforward.

import com.ironsoftware.ironpdf.*;

// Apply your license key
License.setLicenseKey("IRONPDF-MYLICENSE-KEY-1EF01");

// Start using IronPDF!
JAVA

Option 2: Apply license in config.properties config file

Add the following to your config.properties file:

IRONPDF_LICENSE_KEY=IRONPDF-MYLICENSE-KEY-1EF01

Step 3: Test if your key has been installed correctly

// Check if a given license key string is valid.
License.IsValidLicense(String licenseKey);
JAVA

Note: After adding a license always remember to clean and republish you application to avoid potential mistakes in deployment.

Step 4: Get started with your project

Follow our tutorial on how to Get Started with IronPDF.

Questions?

IronPdf for Java is free to use and test in development environments with an IronPDF watermark applied.

To use in live projects and remove the watermark purchase a license. 30 day Trial licenses are also available here.

For our full list of code examples, tutorials, licensing information, and documentation visit: IronPDF for Java.

For more support and inquiries, please ask our team.