Documents > Cookbook >Presentation Document

Create Presentation Document
Let's create an empty presentation document first. The following codes generates an empty presentation document with one slide:

            PresentationDocument document=PresentationDocument.newPresentationDocument();;

We can also create a presentation template document by using the following codes. The operation of the template document is the same with the normal presentation document.

                    PresentationDocument documentTmp=PresentationDocument.newPresentationTemplateDocument();              

Get Presentation Document
We can get the existing presentation Document by using the loadDocument function like follows:
Here presentation.odp is the name of the existing presentation document.
Also we can append all the slides of the specified presentation document to the current document by using the following codes:
Here the slides of the documents "presentation.odp" will be appended to "document".

            PresentationDocument presentationmodel;

Change Presentation Mode
We can switch the mode presentation documents by using the following codes. Here the first one convert the presentation document to a template, and the second one convert the template to a normal presentation document.


Powered by the Apache CMS.

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.

Copyright © 2011 The Apache Software Foundation Licensed under the Apache License, Version 2.0. Contact Us
Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
Other names appearing on the site may be trademarks of their respective owners.