Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The PDFBox2.0 trans to image,but the "org.apache.pdfbox.tools.imageio" cann't find

Tags:

pdfbox

On the apache PDFBox web sit,http://pdfbox.apache.org/2.0/migration.html ,the PDF Rendering example.

ImageIOUtil.writeImage(bim, pdfFilename + "-" + (pageCounter++) + ".png", 300);

the ImageIOUtil cann't find.help me,Thanks

like image 380
Conant Avatar asked Dec 07 '25 08:12

Conant


1 Answers

This is in the pdfbox-tools package, as mentioned on that web page:

ImageIOUtil has been moved into the org.apache.pdfbox.tools.imageio package.

See pdfbox-tools on the download page.

For maven:

<dependency>
    <groupId>org.apache.pdfbox</groupId>
    <artifactId>pdfbox-tools</artifactId>
    <version>2.0.13</version>
</dependency>

(the version may be higher at the time you read this)

like image 111
Tilman Hausherr Avatar answered Dec 12 '25 09:12

Tilman Hausherr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!