2 回答

TA貢獻(xiàn)1844條經(jīng)驗(yàn) 獲得超8個贊
實(shí)際上,我也偶然發(fā)現(xiàn)了這個錯誤,但 PDFBox 文檔中提到了這一點(diǎn)。您需要將以下依賴項(xiàng)添加到您的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'
}
添加回答
舉報(bào)