I encounter the problem in Java slides version 2.5.0 (the latest
one) with PPTX files. When I try to save a PPTX slide as an image (using
pptx library - com.aspose.slides.pptx.PresentationEx and etc.) I get
blank image file for every slide. JAI and JAI Image I/O is installed and the
same presentation in old format (PTT) is converted OK (using
com.aspose.slides.Presentation class and etc.) - I can see an image for
every slide.
The code is the same as in examples:
try{
//Instantiate a PresentationEx class that represents the PPTX file
PresentationEx pres = new PresentationEx(“d:\pptx\ContentBG_ImgJ.pptx”);
//Access the first slide
SlideEx sld = pres.getSlides().get(0);
//Create a full scale image
BufferedImage img = sld.getThumbnail(1f, 1f);
//Save the image to disk in JPEG format
ImageIO.write(img, “JPG”, new File(“d:\pptx\ContentBG_tnailJ.jpg”));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
I want to note once again that the same code works ok for PPT (the only change that we will not use com.aspose.slides.pptx.* classes).
I work with library for jdk1.4.