How to extract images from pdf using Java (not using pdfbox)
I think you're talking about two different things here: extracting images from a PDF, and converting PDF pages to images. PDFToImage
will output an image for every page, while pdfimages extracts all embedded images (e.g. a text document has 0 images).
Take a look at org.apache.pdfbox.tools.ExtractImages
(source code) to see if it does what you want.