Count Slides using Aspose.Slides and pptx4j

Aspose.Slides - Count Slides

Java

 Presentation pres = new Presentation(dataPath + "presentation.pptx");

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

pptx4j - Count Slides

Java

 PresentationMLPackage presentationMLPackage = (PresentationMLPackage)OpcPackage.load(new java.io.File(inputfilepath));

System.out.println("Total Slides: " + presentationMLPackage.getMainPresentationPart().getSlideCount());

Download Running Code

Download running examples for Count Slides from any of the below mentioned social coding sites:

Download Source Code

Download source code for Count Slides from any of the below mentioned social coding sites: