1.首先是maven的pom.xml配置文件部分代码,这里我直接将所有itext使用的包引入进来:
<!-- 设定主仓库,按设定顺序进行查找。 -->
<repositories>
<repository>
<id>jeesite-repos</id>
<name>Jeesite Repository</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</repository>
<!-- iText 依赖主仓库,必须有这个 -->
<repository>
<id>itext</id>
<name>iText Repository - releases</name>
<url>https://repo.itextsupport.com/releases</url>
</repository>
</repositories>
<!-- add all iText Core modules -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext7-core</artifactId>
<version>7.0.4</version>
<type>pom</type>
</dependency>
<!-- pdfSweep -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>cleanup</artifactId>
<version>1.0.2</version>
</dependency>
<!-- pdfCalligraph -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>typography</artifactId>
<version>1.0.2</version>
</dependency>
<!-- pdfInvoice -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>zugferd</artifactId>
<version>1.0.1</version>
</dependency>
<!-- pdfHTML -->
<