0

I'm using iText library for generating PDF files and I could successfully import the required libraries by the following maven dependencies to my java project:

<dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>kernel</artifactId>
    <version>7.0.0</version>
</dependency>
<dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>layout</artifactId>
    <version>7.0.0</version>
</dependency>

Now I want to consume their iText DITO SDK. Although I can find its maven dependency declaration from here, there is not such a dependency in the mvnrepository. Therefore I cannot import the required libraries via the following code snippet.

<dependency>
    <groupId>com.itextpdf.dito</groupId>
    <artifactId>sdk-java</artifactId>
    <version>1.3.7</version>
    <type>pom</type>
</dependency>

How can I resolve this issue? (It is possible to directly import the SDK libs, but I prefer to use the maven capabilities)

Elyas Hadizadeh
  • 3,289
  • 8
  • 40
  • 54

1 Answers1

1

Although The Java SDK is available as a Maven module, to install it, First you need to add the repository to the Maven POM file as follows:

<repositories>
    <repository>
        <id>dito</id>
        <name>DITO Repository</name>
        <url>https://repo.itextsupport.com/dito</url>
    </repository>
</repositories>

Then you can add the dependency to your POM file like this:

<dependencies>
    <dependency>
        <groupId>com.itextpdf.dito</groupId>
        <artifactId>sdk-java</artifactId>
        <version>${dito.sdk.version}</version>
    </dependency>
</dependencies>

Available versions can be founded in repo.itextsupport

Elyas Hadizadeh
  • 3,289
  • 8
  • 40
  • 54
  • 1
    Correct answer. The reason for this is, the Maven Central (search.maven.org) only allows Open Source artifacts. DITO is a closed-source, commercial product, so it is not allowed on Maven Central. So you need to add the iText repository server. – Amedee Van Gasse Jun 23 '20 at 08:52