So is it really possible to create a presentation without using a template? I have a very simple requirement. I need to create a Presentation with 1 or more Slides. Each slide will have a single body rectangle with text in it. Very plain, very basic. Unfortunately I can’t seem to figure out how to create new objects and add them to a slide.
The only way I can see to add a Shape to a slide is to getShapes().add() unfortunately, the slide doesn’t have any shapes yet and I get an NPE. Does anyone have an example of how to do what I am trying to do?
Thanks.
Dear gdboling,
Yes, it is possible to create presentation from scratch.
Presentation presFromScratch = new Presentaion();
It is also possible to add different shapes on the presentation. For example, these are the APIs
Slide.getShapes().addAudioFrameEmbedded
Slide.getShapes().addAudioFrameLinked
Slide.getShapes().addEllipse
Slide.getShapes().addLine
Slide.getShapes().addOleObjectFrame
Slide.getShapes().addPictureFrame
Slide.getShapes().addPolyline
Slide.getShapes().addRectangle
Slide.getShapes().addTable
To see APIs online, follow this link
https://reference.aspose.com/slides/java