hai friends today iam sharing some example to convert a pdf file to jpeg using java program. below java program will helpful to convert a pdf document to jpeg or jpg image.i think this code will helpful to somebody who want to convert pdf to jpeg file.
Node top = doc.childAt(0); doc.formatBeforeAfter(200, 200, null); int w = top.bbox.width; int h = top.bbox.height; BufferedImage img = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); Graphics2D g = img.createGraphics(); g.setClip(0, 0, w, h);