PresentationFactory
Contents
[
Hide
]PresentationFactory class
Allows to create presentation via COM interface
public class PresentationFactory : IPresentationFactory
Constructors
Name | Description |
---|---|
PresentationFactory() | The default constructor. |
Properties
Name | Description |
---|---|
static Instance { get; } | Presentation factory static instance. Read-only PresentationFactory . |
Methods
Name | Description |
---|---|
CreatePresentation() | Creates new presentation. |
CreatePresentation(ILoadOptions) | Creates new presentation with additional load options |
GetPresentationInfo(Stream) | Creates new PresentationInfo object from stream and binds presentation to it. Gets info about presentation in specified stream. |
GetPresentationInfo(string) | Creates new PresentationInfo object from file and binds presentation to it. |
GetPresentationText(Stream, TextExtractionArrangingMode) | Retrieves the raw text from the slides |
GetPresentationText(string, TextExtractionArrangingMode) | Retrieves the raw text from the slides |
GetPresentationText(Stream, TextExtractionArrangingMode, ILoadOptions) | Retrieves the raw text from the slides |
ReadPresentation(byte[]) | Reads an existing presentation from array |
ReadPresentation(Stream) | Reads an existing presentation from stream |
ReadPresentation(string) | Reads an existing presentation from file |
ReadPresentation(byte[], ILoadOptions) | Reads an existing presentation from array with additional load options |
ReadPresentation(Stream, ILoadOptions) | Reads an existing presentation from stream with additional load options |
ReadPresentation(string, ILoadOptions) | Reads an existing presentation from stream with additional load options |
Examples
The following example shows how to checking a Presentation Format.
[C#]
IPresentationInfo info = PresentationFactory.Instance.GetPresentationInfo("pres.pptx");
Console.WriteLine(info.LoadFormat); // PPTX
IPresentationInfo info2 = PresentationFactory.Instance.GetPresentationInfo("pres.ppt");
Console.WriteLine(info2.LoadFormat); // PPT
IPresentationInfo info3 = PresentationFactory.Instance.GetPresentationInfo("pres.odp");
Console.WriteLine(info3.LoadFormat); // ODP
The following example shows how to getting the properties of a Presentation.
[C#]
IPresentationInfo info = PresentationFactory.Instance.GetPresentationInfo("pres.pptx");
IDocumentProperties props = info.ReadDocumentProperties();
Console.WriteLine(props.CreatedTime);
Console.WriteLine(props.Subject);
Console.WriteLine(props.Title);
// ..
The following example shows how to updating the properties of a Presentation.
[C#]
IPresentationInfo info = PresentationFactory.Instance.GetPresentationInfo("pres.pptx");
IDocumentProperties props = info.ReadDocumentProperties();
props.Title = "My title";
info.UpdateDocumentProperties(props);
See Also
- interface IPresentationFactory
- namespace Aspose.Slides
- assembly Aspose.Slides