/ Published in: Java
Opens a PDF Document and renders the first page as an image, which is then saved to file.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * @param args the command line arguments * @throws java.io.IOException */ PDDocument doc = PDDocument.load(file); PDFRenderer pdfRenderer = new PDFRenderer(doc); ImageIOUtil.writeImage(image,"", 300); doc.close(); }