Create New Presentation using Apache POI and Aspose.Slides
Contents
[
Hide
]
Aspose.Slides - New Presentation
The Presentation class holds a presentation’s content. Whether creating a presentation from scratch or modifying an existing one, when finished, you want to save the presentation. With Aspose.Slides for Java, it can be saved as a file or stream.
//Instantiate a Presentation object that represents a PPT file
Presentation pres = new Presentation();
//Writing the presentation as a PPT file
pres.write("NewPPT_Aspose.ppt");
Apache POI SL - HSLF XSLF - New Presentation
SlideShow class create new presentation using Apache POI SL - HSLF and XSLF
//create a new empty slide show
SlideShow ppt = new SlideShow();
//add first slide
Slide s1 = ppt.createSlide();
//save changes in a file
FileOutputStream out = new FileOutputStream("NewPPT_Apache.ppt");
ppt.write(out);
out.close();
Download Running Code
Download Sample Code
For more details, visit Saving a Presentation.