Apache POI SL - Move Slide to New Position

XMLSlideShow ppt = new XMLSlideShow(new FileInputStream("presentation.pptx"));

//add slides
...
...

// Moving slide to new position
XSLFSlide[] slides = ppt.getSlides();
ppt.setSlideOrder(slides[0], 4);

Aspose.Slides

//Instantiate a Presentation object that represents a PPT file
Presentation pres = new Presentation("data/presentation.ppt");
		
//Accessing a slide using its slide position
ISlide slide = pres.getSlides().get_Item(0);

//Change the position of the selected slide
slide.setSlideNumber(2);

Download Source Code

For More Examples, Please Visit Aspose Docs

Last edited Aug 29, 2014 at 7:02 AM by shoaibkhan, version 3