I need to export the pages of an arbitrary PDF document into a series of individual images in jpeg/png/etc format. I need to do this in in Java.
Although I do know about iText, PDFBox and various other java pdf libraries, I am hoping for a pointer to some working example, or some how-to.
Thanks.
Here is one way to do it, combining some code fragments from around the web.
How do I draw a PDF into an Image?
https://pdf-renderer.dev.java.net/examples.html
Creating a Buffered Image from an Image
ORIGINAL: http://www.exampledepot.com/egs/java.awt.image/Image2Buf.html
UPDATED: How to convert buffered image to image and vice-versa?
Saving a Generated Graphic to a PNG or JPEG File
ORIGINAL: http://www.exampledepot.com/egs/javax.imageio/Graphic2File.html
UPDATED: http://docs.oracle.com/javase/tutorial/2d/images/saveimage.html
Combined together into something that works like this to turn all the pages into images: