Installing iText licensing for Java developers

Thank you for your interest in our PDF library, we hope you will enjoy using our product and share your experiences with us and the iText community. We will walk you through the installation process of the iText license key and library.

Finally, if you would require extra help please have a look at our FAQs or the community discussion at Stack Overflow. If you are interested in getting support of our in-house developers and/or a license key for commercial iText products, you will need to acquire a commercial license.

Introduction

  • iText 7 uses a licensing mechanism that also allows you to use the core libraries in open source projects. For the open source components, it is not mandatory to include the licensing library.
    • iText 7 Core libraries
  • The effect loading a license will have is that the producer line will change depending on the license you loaded:
    • “AGPL version”, when not using the licensing library or when using an invalid/expired license
    • “Trial version”, when using the licensing library and a valid trial license
    • “Licensed version ”, when using the licensing library and a valid license
  • The producer line is “iText ® 7.x.y © 2000—2016 iText Group NV”, followed by a suffix. This suffix is:
    • (AGPL version) when the licensekey library is missing, when no license file is loaded, or when the license file is expired.
    • (company name; Trial version) when a trial license is used.
    • (company name; licensed version) when a valid license is used.
  • For iText’s proprietary libraries a valid (trial) license is needed. Reach out to get a valid license.

Pre-installation

The requirements for the Java version and Android version are:

  • Obtain a (trial) license, for iText’s proprietary libraries a valid (trial) license is needed.
  • The licensekey library (itext-licensekey-x.y.z.jar) needs to be on the classpath. It can be downloaded from the following URL: https://repo.itextsupport.com/simple/releases/com/itextpdf/itext-licensekey/
  • After accepting the terms of use, download the license file through the portal by selecting it and clicking on 'Download Selected Keys'.
  • It will download in a zip file that includes an XML file named itextkey-0.xml. This is a XML file with information about who you are, and a key that allows you to use the software.
  • To be able to load this license file you need an additional library - the license key library (.jar or .dll) for Java 
  • If you already downloaded the license key library before, please make sure you have the latest one.
  • The license key will work for iText 7 Core and the add-ons.

 

  • NOTE:

    • Please use the latest version of the license key library when using your license key. 

    • iText 7 uses a licensing mechanism that also allows you to use the core libraries in open source projects. For the open source components, it is not mandatory to include the licensing library.
    • With the introduction of version 3.0.0 of the license key library, we also released a volume based counting mechanism. The mechanism works with an event system. iText and its add-ons will send events through this event system. When a volume license key file has been loaded, the statistics concerning usage will be sent to our servers. This means the machine that runs your application needs an active Internet connection. Click here to read our guide showing you how to enable the automated monitoring of volume licenses (Capacity Rental License).

Installation

  • Use the latest version of the license key library when using your license key. Our current license key libraries for iText are version 1.x.x for iText 5 and 3.x.x for iText 7.
  • The license key library (itext-licensekey-x.y.z.jar) needs to be on the classpath. It can be downloaded from our repository.
  • You can also use Maven to resolve this dependency. To do so, add the iText Artifactory server, https://repo.itextsupport.com/releases, as an additional repository in the repositories section of your pom.xml, as described in the Maven documentation. Then you can add the following dependency to your dependencies:

  • <properties>
           <itext.version>RELEASE</itext.version>
    </properties>
    <dependencies>
      <!-- iText 7 License Key Library -->
      <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>itext-licensekey</artifactId>
        <version>${itext.licensekey.version}</version>
      </dependency>
    </dependencies>
    

Load the license key

  • You'll need two things:

    • the license key file, and 

    • the lastest version of the license key library.

  • The license key file (typically itextkey.xml) needs to be loaded before calling the proprietary code. This is done using the static method  of the LicenseKey class: LicenseKey.loadLicenseFile("path/to/itextkey.xml"). You can also use this method with an InputStream to the license file, as explained earlier.
  • For Java, the license key library (itext-licensekey-x.y.z.jar) needs to be on the classpath. The license key file (typically itextkey.xml) needs to be loaded before calling the proprietary code. This is done using the static method loadLicenseFile() of the LicenseKey class:
    LicenseKey.loadLicenseFile("path/to/itextkey.xml")

    Do note that you'll need to call this line of code before any other iText API call. Not loading the key at start up might result in the producer line having a reference to "AGPL" instead of your company name.

Enable the automated monitoring of volume licenses (Capacity Rental License)

With the introduction of version 3.0.0 of the license key library, we also released a volume based counting mechanism. The mechanism works with an event system. iText and its add-ons will send events through this event system. When a volume license key file has been loaded, the statistics concerning usage will be sent to our servers. This means the machine that runs your application needs an active Internet connection. Click here to read our guide showing you how to enable the automated monitoring of volume licenses (Capacity Rental License).

Contact

Still have questions? 

We're happy to answer your questions. Reach out to us and we'll get back to you shortly.

Contact us
Stay updated

Join 11,000+ subscribers and become an iText PDF expert by staying up to date with our new products, updates, tips, technical solutions and happenings.

Subscribe Now