2 回答
TA贡献1844条经验 获得超8个赞
实际上,我也偶然发现了这个错误,但 PDFBox 文档中提到了这一点。您需要将以下依赖项添加到您的pom.xml
:
<dependency>
<groupId>com.github.jai-imageio</groupId>
<artifactId>jai-imageio-core</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>com.github.jai-imageio</groupId>
<artifactId>jai-imageio-jpeg2000</artifactId>
<version>1.3.0</version>
</dependency>
<!-- Optional for you ; just to avoid the same error with JBIG2 images -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>jbig2-imageio</artifactId>
<version>3.0.3</version>
</dependency>
如果您使用 Gradle :
dependencies {
implementation 'com.github.jai-imageio:jai-imageio-core:1.4.0'
implementation 'com.github.jai-imageio:jai-imageio-jpeg2000:1.3.0'
// Optional for you ; just to avoid the same error with JBIG2 images
implementation 'org.apache.pdfbox:jbig2-imageio:3.0.3'
}
添加回答
举报