Menu

Open and Save Presentation

Shoaib

Apache POI SL

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

//append a new slide to the end
XSLFSlide blankSlide = ppt.createSlide();

//save changes in a file
FileOutputStream out = new FileOutputStream("data/EditedPPT_Apache.pptx");
ppt.write(out);
out.close();

Aspose.Slides

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

//Add the title slide
ISlide slide = pres.getSlides().addEmptySlide(pres.getLayoutSlides().get_Item(0));

//Save the presentation
pres.save("data/EditedPPT_Aspose.ppt", SaveFormat.Ppt);

Download Source Code


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.