PDFBox 2.0.4 从其站点下载时和从 Maven 获取时具有不同的 JAR 文件

PDFBox 2.0.4 has different JAR files when downloaded from its site and when taken from Maven

如果我用

<dependency>
  <groupId>org.apache.pdfbox</groupId>
  <artifactId>pdfbox</artifactId>
  <version>2.0.4</version>
</dependency>

按照 https://pdfbox.apache.org/2.0/getting-started.html 的指示,我没有在 org.apache.pdfbox.tools 和 org.apache.pdfbox.tools.imageio 得到 类(例如 ImageIOUtil、JPEGUtil、MetaUtil、TIFFUtil 等).

但是,如果我从 http://www.gtlib.gatech.edu/pub/apache/pdfbox/2.0.4/pdfbox-app-2.0.4.jar as directed from https://pdfbox.apache.org/download.cgi#20x 下载 JAR 文件,我会全部下载。

你从maven得到的是pdfbox下载。您从下载 URL(您可能会注意到 10 个不同的下载)中获得的是 pdfbox-app,它用于命令行工具(包含所有内容)。这些是不同的下载。如果你想要 ImageIOUtil、JPEGUtil、MetaUtil、TIFFUtil,那么获取 pdfbox-tools 作为 pdfbox 神器的补充。