Appreciate your early help on this - I really need to get this done.
Here is the code for PPT I am using-
Presentation pres = new Presentation(strTempPath);
int pageCount = pres.getSlides().size();
coreObject.setPageCount(pageCount);
// Accessing a slide using its slide position
Slide slide = pres.getSlideByPosition(iPageNo);
// as index is starting from 1 for ppt files
// Getting the thumbnail image of the slide of a specified size
BufferedImage image = slide.getThumbnail(new Dimension(720, 540));
// Set fonts to be scanned for under the specified directory. Do
// not search within sub-folders.
FontSettings.setFontsFolder(ResourceLocator.getProperty(“FONTS”), false);
// Saving the thumbnail image in png format
output = new ByteArrayOutputStream();
ImageIO.write(image, “png”, output);
Here is the code for PPTX I am using-
PresentationEx pres = new PresentationEx(strTempPath);
int pageCount = pres.getSlides().size();
coreObject.setPageCount(pageCount);
// Accessing a slide using its slide position
SlideEx slide = pres.getSlides().get_Item(iPageNo - 1);
// as index is starting from 0 for pptx files
// Getting the thumbnail image of the slide of a specified size
BufferedImage image = slide.getThumbnail(1f, 1f);
// Set fonts to be scanned for under the specified directory. Do
// not search within sub-folders.
FontSettings.setFontsFolder(ResourceLocator.getProperty(“FONTS”), false);
// Saving the thumbnail image in png format
output = new ByteArrayOutputStream();
ImageIO.write(image, “png”, output);