问题描述
我正在尝试使用PDFBox提取PDF文件中的所有图像。对于包含jpeg和png图像的pdf,它的工作效果很好。但是它不适用于OpenJPEG2000图像。我收到以下异常: 出现以下错误:
org.apache.pdfbox.contentstream.PDFStreamEngine operatorException
SEVERE: Cannot read JPEG2000 image: Java Advanced Imaging (JAI) Image I/O Tools are not installed
在所有版本的PDFBox中,都会出现相同的异常。也尝试过使用独立的jar。
我也在pom.xml中包括了必要的依赖项。
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>jbig2-imageio</artifactId>
</dependency>
<!-- For legal reasons (incompatible license),these two dependencies
are to be used only in the tests and may not be distributed. -->
<dependency>
<groupId>com.github.jai-imageio</groupId>
<artifactId>jai-imageio-core</artifactId>
</dependency>
<dependency>
<groupId>com.github.jai-imageio</groupId>
<artifactId>jai-imageio-jpeg2000</artifactId>
</dependency>
任何帮助将不胜感激。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)