Apache POI SL - Count Number of Slides

SlideShow ppt = new SlideShow(new FileInputStream("presentation.ppt"));
System.out.println("Total Slides Count: " + ppt.getSlides().length);

Aspose.Slides

//Instantiate a PresentationEx object that represents a PPTX file
Presentation pres = new Presentation("data/presentation.pptx");

System.out.println("Total Slides in Count: " + pres.getSlides().size());

Download Source Code

For More Examples, Please Visit Aspose Docs

Last edited Aug 29, 2014 at 5:59 AM by shoaibkhan, version 2