You can copy a slide in the presentation document from one position to another by using the following codes:
Here the first parameter is the source position of the slide need to be copied, the second parameter is the destination position of the slide need to be copied, and the last parameter is the new name of the copied slide.
document.copySlide(1, 2, "copied slide");
And also you can copy a slide from another document by using the following codes:
Here the first parameter of copyForeignSlide is the new position of the copied slide in the current document, the second parameter is the source document of the copied slide, and the last one is the slide index of the source document that need to be copied.
You can set the text content of a slide with text box API since version 0.5. Below codes will get the title text box of a slide, set the text content, and then get the outline text box, set the list content.
Textbox titleBox = slide.getTextboxByUsage(PresentationClass.TITLE).get(0);
titleBox.setTextContent("This is the title"); Textbox outline = slide.getTextboxByUsage(PresentationClass.OUTLINE).get(0); List txtList = outline.addList();
To add some text, you can first get the notes of one slide and then add text to this corresponding notes. The following codes shows this process:
Apache "ODF Toolkit" is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.
Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and
decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is
not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has
yet to be fully endorsed by the ASF.