简体   繁体   中英

How to create and extract an image from a scanned PDF file (Java)

I´m using JAVA and I´m trying to extract or save images files from a scanned pdf. The problem is that i only get black images. I just want to crop a logo (can be blackandwhite) from scanned pdf´s.

anyone has idea? or examples?

Advance thanks for reply

Well. I used ImageMagick and Ghostscript libs. Then I used this on my JAVA project:

Process p = Runtime.getRuntime().exec("cmd /c convert -density 400x400 -layers flatten pdffile.pdf[0] tmp.png");

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