What is the latest version of iText? And what is the maven dependency for that?
16 Answers
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 theMPL&GPLlicense, withcom.lowagiegroupId; - iText
4.2.1: the latest unofficial release by ymasory/InProTopia, under theMPL&GPLlicense, withcom.lowagiegroupId; - iText
5.0.0and higher: released by iText Group NV, under theAGPLlicense, withcom.itextpdfgroupId. One monolithic jar. - iText
7.0.0and higher: released by iText Group NV, under theAGPLlicense, withcom.itextpdfgroupId. Several modular jars.
Here you can find 2.1.7 and 4.2.x versions on Maven Repository:
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.
5looks 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> 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> 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
5Last dependency is (for pdf form java code):
<dependency> <groupId>com.itextpdf</groupId> <artifactId>itext-core</artifactId> <version>${itextpdf.version}</version> // at post time 8.0.1 <type>pom</type> </dependency> See itext7 repo pom and Maven Central
This was the latest release as of today <!-- --> <dependency> <groupId>com.itextpdf</groupId> <artifactId>itextpdf</artifactId> <version>5.5.9</version> </dependency> 1