public class PresentationFactory extends java.lang.Object implements IPresentationFactory
Allows to create presentation via COM interface
The following example shows how to checking a Presentation Format.IPresentationInfo info = PresentationFactory.getInstance().getPresentationInfo("pres.pptx"); System.out.println(info.getLoadFormat()); // PPTX IPresentationInfo info2 = PresentationFactory.getInstance().getPresentationInfo("pres.ppt"); System.out.println(info2.getLoadFormat()); // PPT IPresentationInfo info3 = PresentationFactory.getInstance().getPresentationInfo("pres.odp"); System.out.println(info3.getLoadFormat()); // ODPThe following example shows how to getting the properties of a Presentation.IPresentationInfo info = PresentationFactory.getInstance().getPresentationInfo("pres.pptx"); IDocumentProperties props = info.readDocumentProperties(); System.out.println(props.getCreatedTime()); System.out.println(props.getSubject()); System.out.println(props.getTitle()); // ..The following example shows how to updating the properties of a Presentation.IPresentationInfo info = PresentationFactory.getInstance().getPresentationInfo("pres.pptx"); IDocumentProperties props = info.readDocumentProperties(); props.setTitle("My title"); info.updateDocumentProperties(props);
| Constructor and Description |
|---|
PresentationFactory() |
| Modifier and Type | Method and Description |
|---|---|
IPresentation |
createPresentation()
Creates new presentation.
|
IPresentation |
createPresentation(ILoadOptions options)
Creates new presentation with additional load options
|
static PresentationFactory |
getInstance()
Presentation factory static instance.
|
IPresentationInfo |
getPresentationInfo(java.io.InputStream stream)
Creates new PresentationInfo object from stream and binds presentation to it.
|
IPresentationInfo |
getPresentationInfo(java.lang.String file)
Creates new PresentationInfo object from file and binds presentation to it.
|
IPresentationText |
getPresentationText(java.io.InputStream stream,
int mode)
Retrieves the raw text from the slides
|
IPresentationText |
getPresentationText(java.io.InputStream stream,
int mode,
ILoadOptions options)
Retrieves the raw text from the slides
|
IPresentationText |
getPresentationText(java.lang.String file,
int mode)
Retrieves the raw text from the slides
|
IPresentation |
readPresentation(byte[] data)
Reads an existing presentation from array
|
IPresentation |
readPresentation(byte[] data,
ILoadOptions options)
Reads an existing presentation from array with additional load options
|
IPresentation |
readPresentation(java.io.InputStream stream)
Reads an existing presentation from stream
|
IPresentation |
readPresentation(java.io.InputStream stream,
ILoadOptions options)
Reads an existing presentation from stream with additional load options
|
IPresentation |
readPresentation(java.lang.String file)
Reads an existing presentation from file
|
IPresentation |
readPresentation(java.lang.String file,
ILoadOptions options)
Reads an existing presentation from stream with additional load options
|
public static PresentationFactory getInstance()
Presentation factory static instance.
Read-only PresentationFactory.
public final IPresentation createPresentation()
Creates new presentation.
createPresentation in interface IPresentationFactorypublic final IPresentation createPresentation(ILoadOptions options)
Creates new presentation with additional load options
createPresentation in interface IPresentationFactoryoptions - Load optionspublic final IPresentationInfo getPresentationInfo(java.lang.String file)
Creates new PresentationInfo object from file and binds presentation to it.
getPresentationInfo in interface IPresentationFactoryfile - Presentation file.public final IPresentationInfo getPresentationInfo(java.io.InputStream stream)
Creates new PresentationInfo object from stream and binds presentation to it. Gets info about presentation in specified stream.
getPresentationInfo in interface IPresentationFactorystream - Presentation stream.public final IPresentation readPresentation(byte[] data)
Reads an existing presentation from array
readPresentation in interface IPresentationFactorydata - Array to readpublic final IPresentation readPresentation(byte[] data, ILoadOptions options)
Reads an existing presentation from array with additional load options
readPresentation in interface IPresentationFactorydata - Array to readoptions - Load optionspublic final IPresentation readPresentation(java.io.InputStream stream)
Reads an existing presentation from stream
readPresentation in interface IPresentationFactorystream - Input stream to readpublic final IPresentation readPresentation(java.io.InputStream stream, ILoadOptions options)
Reads an existing presentation from stream with additional load options
readPresentation in interface IPresentationFactorystream - Input stream to readoptions - Load optionspublic final IPresentation readPresentation(java.lang.String file)
Reads an existing presentation from file
readPresentation in interface IPresentationFactoryfile - File namepublic final IPresentation readPresentation(java.lang.String file, ILoadOptions options)
Reads an existing presentation from stream with additional load options
readPresentation in interface IPresentationFactoryfile - File nameoptions - Load optionspublic final IPresentationText getPresentationText(java.lang.String file, int mode)
Retrieves the raw text from the slides
getPresentationText in interface IPresentationFactoryfile - Input filemode - Extraction modepublic final IPresentationText getPresentationText(java.io.InputStream stream, int mode)
Retrieves the raw text from the slides
getPresentationText in interface IPresentationFactorystream - Input streammode - Extraction modepublic final IPresentationText getPresentationText(java.io.InputStream stream, int mode, ILoadOptions options)
Retrieves the raw text from the slides
getPresentationText in interface IPresentationFactorystream - Input streammode - Extraction modeoptions - Load optionsCopyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.