I want to use a Open Office / Libre Office Presentation as a template and insert text and images into slides. I am trying to use odftoolkit. If I have a slide with the boxes, they are represented as <draw:frame>
in the XML
How do I access those to place an image in them? Should I use these classes?
org.odftoolkit.simple.PresentationDocument
org.odftoolkit.simple.presentation.Slide
When I have a slide open the related methods I see are:
.getOdfElement
.getFrameContainerElement
But I am not able to see how to select frames in the slide. When I open the XML I have the 5 frames under <draw:page>
.
The have attributes like: presentation:style-name="pr2" draw:layer="layout"
As Eugene commented, I had to find the target frame and do more work. There is no method to add images to a frame, only to a slide. I went into the methods and succeeded as follow:
I was hoping for something closer to the GUI because I think I have missed some styles and better way to find frames. But anyway it is not bad.