<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>3.0.0-RC1</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox-tools</artifactId>
<version>3.0.0-RC1</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>fontbox</artifactId>
<version>3.0.0-RC1</version>
</dependency>
# **下面的这三个包一定要加,*只要你pdf转图片就一定要加上*,
要不然转换的过程中可能会有异常,但是已经被捕获了,你根本看不到**
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>jbig2-imageio</artifactId>
<version>3.0.3</version>
</dependency>
<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.4.0</version>
</dependency>
在转换时是不会报任何错误信息的,输出出来的图片至少是一张白色的图,不管是
这样写还是(1.8.*或者2.0.*指的是jar包的版本)
等等。很多书写的方式,只要书写正确就可以。
参考链接:
https://www.codenong.com/23326562/
https://anjia0532.github.io/2021/09/09/convert-pdf-to-png/