简体   繁体   中英

Converting PDF Byte Array to jpg image(JAVA Project)

We are trying to convert PDF Byte Array to image(jpg format) in a JAVA project. We initially used PDFBox library but we are facing issues with the output. The generated PDF documents generated by PDFBox are ok but sometimes the images generated are blank.

Can anyone suggest some reliable and robust PDF libraries for JAVA. We are mainly looking for open source libraries but licensed libraries are also an option.

Thanks

There is a command line tool on Linux you can use from ImageMagick

convert file.pdf file.png
convert file.pdf file.jpeg

Can you stream your bytes through convert? Or write to tempfile and then convert?

Opensource Libraries

http://www.jpedal.org/ https://pdf-renderer.dev.java.net/ http://code.google.com/p/pdfonejava/

Commercial Libraries, http://www.qoppa.com/pdfimages/index.html http://www.crionics.com/

I would prefer using jpedal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM