Pdf to image using java
问题 Good day fellow programmer. I'm new to java, and I need to create an Image from a specific part of a pdf. Currently, I'm using pdfbox. Here is my code to create an image from a pdf (it's working but it creates an image of the whole pdf page): PDDocument document = PDDocument.load(new File(PDFFILE)); PDFRenderer pdfRenderer = new PDFRenderer(document); for (int page = 0; page < document.getNumberOfPages(); ++page) { BufferedImage bim = pdfRenderer.renderImageWithDPI(page, 300, ImageType.RGB);