Hi, Any updates please. Its kind of urgent for me to make a headway on this.
Any help would be greatly appreciated! Cheers! Am. -----Original Message----- From: Amol Tiwari [mailto:[EMAIL PROTECTED] Sent: Monday, April 21, 2008 12:08 PM To: [email protected] Subject: Regarding converting a PPT Slide to JPG/PNG Hi, I have seen the earlier mailing list posts on how converting a PPT slide into JPG was not possible. ( I am referring to the list at: http://mail-archives.apache.org/mod_mbox/poi-user/200611.mbox/thread) I have also read a code snippet which is trying to achieve this. (I am referring to http://poi.apache.org/hslf/how <http://poi.apache.org/hslf/how-to-shapes.html#Render> -to-shapes.html#Render) FileInputStream is = new FileInputStream("slideshow.ppt"); SlideShow ppt = new SlideShow(is); is.close(); Dimension pgsize = ppt.getPageSize(); Slide[] slide = ppt.getSlides(); for (int i = 0; i < slide.length; i++) { BufferedImage img = new BufferedImage(pgsize.width, pgsize.height, BufferedImage.TYPE_INT_RGB); Graphics2D graphics = img.createGraphics(); //clear the drawing area graphics.setPaint(Color.white); graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width, pgsize.height)); //render slide[i].draw(graphics); //save the output FileOutputStream out = new FileOutputStream("slide-" + (i+1) + ".png"); javax.imageio.ImageIO.write(img, "png", out); out.close(); } The line marked Red (Slide[i].draw(graphics) ) is not correct. Does anyone have a working model for this code? Can anyone help me with this? Is it possible with the recent build? (I am using \poi-bin-3.0.2-FINAL-20080204\poi-3.0.2-FINAL) Thanks and Regards! Amol. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
