Link
Skip to main content

Add JPedal as a Gradle dependency

Table of contents

  1. Adding the jar manually
  2. Using our remote Maven repository
    1. 1. Add the repository
    2. 2. Add the dependency
      1. Customer artifact IDs
      2. Trial artifact IDs
      3. Daily builds

In order to use JPedal in a Gradle project, you will need to add the jar to the project as a dependency. You can either add the jar manually or use our remote Maven repository.

The snippets below are shown for both the Groovy (build.gradle) and Kotlin (build.gradle.kts) DSLs — use whichever matches your project.

Adding the jar manually

You will need to first download the JPedal jar:

Download JPedal

Add the jar into your project’s lib folder, then add a file dependency that points at it:

Groovy

dependencies {
    implementation files("lib/jpedal.jar")
}

Kotlin

dependencies {
    implementation(files("lib/jpedal.jar"))
}

The example above uses the filename jpedal.jar. Update the path to match the name of the jar you downloaded — the trial jar, for example, has a different filename.

Using our remote Maven repository

1. Add the repository

Add our repository to your build file, with your login information. There are two ways to provide credentials:

Option 1 — Using gradle.properties (recommended)

This keeps your credentials out of your build file, and therefore out of version control. Add the repository:

Groovy

repositories {
    maven {
        url = "https://maven.idrsolutions.com"
        name = "IDRsolutions"
        credentials(PasswordCredentials)
    }
}

Kotlin

repositories {
    maven {
        url = uri("https://maven.idrsolutions.com")
        name = "IDRsolutions"
        credentials(PasswordCredentials::class)
    }
}

Then, in a gradle.properties file (you can either use one in your project root directory, or in your GRADLE_USER_HOME directory), add the following:

IDRsolutionsUsername={Customer Username or Trial Token}
IDRsolutionsPassword={Customer Password or Trial Token}

More about gradle.properties files can be found here.

For the trial, set both the username and password to your trial token.

Option 2 — Inline credentials

Simpler, but your credentials end up in your build file (and likely in version control), so prefer Option 1 where possible.

Groovy

repositories {
    maven {
       url = "https://maven.idrsolutions.com"
       credentials {
         username "{Customer Username or Trial Token}"
         password "{Customer Password or Trial Token}"
       }
    }
}

Kotlin

repositories {
    maven {
       url = uri("https://maven.idrsolutions.com")
       credentials {
         username = "{Customer Username or Trial Token}"
         password = "{Customer Password or Trial Token}"
       }
    }
}

For the trial, set both the username and password to your trial token.

2. Add the dependency

Next, add JPedal as a dependency:

Groovy

dependencies {
    implementation "com.idrsolutions:{artifactId}:{version}"
}

Kotlin

dependencies {
    implementation("com.idrsolutions:{artifactId}:{version}")
}

Customer artifact IDs

  • jpedal where version is in the format YYYY.MM

Only versions after 2021.11 are available, and we only support the most recent version of JPedal.

Trial artifact IDs

  • jpedal-trial where version is in the format YYYY.MM

Daily builds

Customers may access daily builds with the following artifact IDs.

The Maven repository only stores the most recent daily build.

  • jpedal-daily where version is in the format YYYY.MM.DD

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