Skip to main content
Skip table of contents

Installing iText Community for Java developers

How to install iText Community Java version

Thank you for your interest in our open-source 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, from downloading iText Community to adding the dependency to your Java build tool.

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

Before you install

  • Make sure you have read and agreed upon the AGPL license.  All downloads we offer open-source come with the AGPL license model.

  • Download the modules (.jar) of iText Community (ZIP files) from Maven Central: iText Community

  • Important remark: In our installation guides, we use Maven as a build tool for Java.

Installation

Automated dependency management for iText Community Java

iText Community is available via Maven on The Central repository. You will need to choose whether you want to add all modules or just the ones you require.

Adding all modules

If you need all iText Community modules, then you don't need to add the individual modules and you can just add this XML snippet in your pom.xml. Maven will then do all the heavy lifting for you and download the required modules from The Central Repository.

XML
<properties>
       <itext.version>8.0.4</itext.version>
</properties>
<dependencies>
<!-- add all iText Community modules -->
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>itext-core</artifactId>
        <version>${itext.version}</version>
        <type>pom</type>
    </dependency>
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>bouncy-castle-adapter</artifactId>
        <version>${itext.version}</version>
    </dependency>
</dependencies>

 Adding only the modules you need

f you do not require some of the functionality in iText, then you can add only the modules you need. Please be aware you will always need kernelio and layout. You will need to add the following XML snippets to your pom.xml - this is to add iText Community as a dependency to your pom.xml.

 

XML
<properties>
       <itext.version>8.0.4</itext.version>
</properties>

<dependencies>
<!-- always needed -->
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>kernel</artifactId>
        <version>${itext.version}</version>
    </dependency>

<!-- always needed -->
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>io</artifactId>
        <version>${itext.version}</version>
    </dependency>

<!-- always needed -->
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>layout</artifactId>
        <version>${itext.version}</version>
    </dependency>

<!-- always needed -->
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>bouncy-castle-adapter</artifactId>
        <version>${itext.version}</version>
    </dependency>

<!-- only needed for forms -->
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>forms</artifactId>
        <version>${itext.version}</version>
    </dependency>

<!-- only needed for PDF/A -->
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>pdfa</artifactId>
        <version>${itext.version}</version>
    </dependency>

<!-- only needed for PDF/UA -->
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>pdfua</artifactId>
        <version>${itext.version}</version>
    </dependency>
    
<!-- only needed for digital signatures -->
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>sign</artifactId>
        <version>${itext.version}</version>
    </dependency>

<!-- only needed for barcodes -->
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>barcodes</artifactId>
        <version>${itext.version}</version>
    </dependency>

<!-- only needed for Asian fonts -->
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>font-asian</artifactId>
        <version>${itext.version}</version>
    </dependency>

<!-- only needed for hyphenation -->
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>hyph</artifactId>
        <version>${itext.version}</version>
    </dependency>

</dependencies>

Using sign functionality

All the necessary bouncy-castle related classes are grouped into two modules: bouncy-castle-adapter and bouncy-castle-fips-adapter.

One of these modules is required to be in a classpath, although only bouncy-castle-adapter is used in the examples above.

It is important not to add them both as a dependency since they are not compatible.

com.itextpdf:bouncy-castle-adapter  maven module encapsulates bouncy-castle related classes for these two maven dependencies:

  • org.bouncycastle:bcpkix-jdk15on

  • org.bouncycastle:bcprov-jdk15on

com.itextpdf:bouncy-castle-fips-adapter maven module encapsulates bouncy-castle related classes for these two maven dependencies:

  • org.bouncycastle:bcpkix-fips

  • org.bouncycastle:bc-fips

you can read more about it here.

After Installation

Check out the Java jump-start tutorial and helpful code examples here on the Knowledge Base, or you can find our API documentation in the Resources section of our website.

iText Community Java on GitHub

Adding our open-source add-ons

If you would like to add one of our open-source add-ons, please first have a look at the compatibility matrix and the installation guides of each of these add-ons.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.