ghost4j

Convert a PDF file to image

六月ゝ 毕业季﹏ 提交于 2019-11-27 01:21:26
问题 I wanted to convert PDF document into image. I was using Ghost4j. Problem: Ghost4J needs gsdll32.dll file at runtime, and I do not want to use the dll file. Question 1: is there any way, in ghost4j to convert image without the dll? Question 2: I found the solution in PDFBox API. org.apache.pdfbox.pdmodel.PDPagep have method convertToImage()` which converts PDF page to Image format. PDDocument doc = PDDocument.load(new File("/document.pdf")); List<PDPage>pages = doc.getDocumentCatalog()