13

What is the latest version of iText? And what is the maven dependency for that?

Andrea Ligios
  • 49,480
  • 26
  • 114
  • 243
PSR
  • 39,804
  • 41
  • 111
  • 151
  • I am not sure if this should be closed or not. But such a question would always require an updated answer. Marking it `too broad` for such concern, unless updated. – Naman Dec 15 '16 at 04:44

5 Answers5

25

You need to pay attention to the license for the Java version of iText:

  • iText 2.1.7: the latest official release by iText Group NV, under the MPL & GPL license, with com.lowagie groupId;
  • iText 4.2.1: the latest unofficial release by ymasory/InProTopia, under the MPL & GPL license, with com.lowagie groupId;
  • iText 5.0.0 and higher: released by iText Group NV, under the AGPL license, with com.itextpdf groupId. One monolithic jar.
  • iText 7.0.0 and higher: released by iText Group NV, under the AGPL license, with com.itextpdf groupId. Several modular jars.

Here you can find 2.1.7 and 4.2.x versions on Maven Repository:

Find before 5.x versions: http://search.maven.org/#search|gav|1|g%3A%22com.lowagie%22%20AND%20a%3A%22itext%22

Find 5.x versions: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.itextpdf%22%20AND%20a%3A%22itextpdf%22

You may want to stick with the MPL & GPL versions, unless you are available to follow the AGPL license specification...

EDIT: You should pay attention on which version you are choosing;

According to Bruno Lowagie comment, versions 2.1.x are deprecated and should not be used due to technical and legal reasons.

Amedee Van Gasse
  • 7,280
  • 5
  • 55
  • 101
Andrea Ligios
  • 49,480
  • 26
  • 114
  • 243
  • 2
    You can't "deprecate" a library, you deprecate classes or methods. Pushing people toward your commercially licensed versions isn't terribly subtle. – Ari Maniatis May 22 '15 at 13:40
  • (iText Software QA/Release Engineer here) iText 4.2.0 was never released into the wild. It only existed as an svn tag, used to sync up iText and iTextSharp, which was at 4.1.6 at the time. It also happens to be the last commit before the commit where the AGPL headers were added to all .java files. When I moved iText's code hosting from svn (SourceForge) to git (GitHub), I cleaned up all tags that weren't official releases. – Amedee Van Gasse Jul 08 '15 at 10:20
  • 1
    iText 4.2.2 is now on Maven Central, sync to other Maven servers will automatically happen in the following hours and days: http://search.maven.org/#artifactdetails%7Ccom.lowagie%7Citext%7C4.2.2%7Cjar. It is a POM-only release, with relocation to com.itextpdf:itextpdf. The relocation has the following message: "After release 2.1.7, iText moved from the MPLicense to the AGPLicense. The groupId changed from com.lowagie to com.itextpdf and the artifactId from itext to itextpdf. See http://itextpdf.com/functionalitycomparison for more information." – Amedee Van Gasse Jul 08 '15 at 11:41
  • and what are the dependencies of itext itself? – Kalpesh Soni Jan 29 '16 at 15:24
  • Which one ? For the latest they're [here](http://mvnrepository.com/artifact/com.itextpdf/itextpdf/5.5.8#snippets). BTW that's the reason you should use Maven, that handles all this stuff for you – Andrea Ligios Jan 29 '16 at 15:25
4

looks like 5.3.5 is not in repository yet so 5.3.4 works for me:

<dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>itextpdf</artifactId>
    <version>5.3.4</version>
</dependency>
faskunji
  • 151
  • 1
  • 2
  • 7
3

As with many (any?) open-source library, their website contains a changelog. iText's one can be found here.

And as of today, the latest version is 5.5.9 7.0.0.

The dependency for version 5.5.9 would be

<dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>itextpdf</artifactId>
    <version>5.5.9</version>
</dependency>
Joris Schellekens
  • 8,483
  • 2
  • 23
  • 54
Alexis Pigeon
  • 7,423
  • 11
  • 39
  • 44
3

iText 7 was released in May 2016. iText 7 is no longer one monolithic jar file, like iText 5 used to be. You use only those modules you need.

Put this in your POM file:

<dependencies>

  <dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>barcodes</artifactId>
    <version>7.0.0</version>
    <!-- barcodes depends on kernel -->
  </dependency>

  <dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>font-asian</artifactId>
    <version>7.0.0</version>
  </dependency>

  <dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>forms</artifactId>
    <version>7.0.0</version>
    <!-- forms depends on kernel and layout -->
  </dependency>

  <dependency>
      <groupId>com.itextpdf</groupId>
      <artifactId>hyph</artifactId>
      <version>7.0.0</version>
  </dependency>

  <dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>io</artifactId>
    <version>7.0.0</version>
  </dependency>

  <dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>kernel</artifactId>
    <version>7.0.0</version>
    <!-- kernel depends on io -->
  </dependency>

  <dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>layout</artifactId>
    <version>7.0.0</version>
    <!-- layout depends on kernel -->
  </dependency>

  <dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>pdfa</artifactId>
    <version>7.0.0</version>
    <!-- pdfa depends on kernel -->
  </dependency>

  <dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>sign</artifactId>
    <version>7.0.0</version>
    <!-- sign depends on kernel, layout and forms -->
  </dependency>

</dependencies>

This, and more information, can be found on https://developers.itextpdf.com/itext-7-java

Joris Schellekens
  • 8,483
  • 2
  • 23
  • 54
Amedee Van Gasse
  • 7,280
  • 5
  • 55
  • 101
-1
This was the latest release as of today

<!-- http://mvnrepository.com/artifact/com.itextpdf/itextpdf -->

<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.9</version>
</dependency>
prasad
  • 3
  • 5