Class PresentationFactory

Class PresentationFactory

Namespace: Aspose.Slides
Assembly: Aspose.Slides.dll (25.12.0)

Allows to create presentation via COM interface

[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
[Guid("ae237afa-7b05-4da4-bed3-654f6f09fd82")]
public class PresentationFactory

Inheritance

object PresentationFactory

Examples

The following example shows how to checking a Presentation Format.

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.

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.

IPresentationInfo info = PresentationFactory.Instance.GetPresentationInfo("pres.pptx");
IDocumentProperties props = info.ReadDocumentProperties();
props.Title = "My title";
info.UpdateDocumentProperties(props);

Constructors

PresentationFactory()

public PresentationFactory()

Properties

Instance

Presentation factory static instance. Read-only Aspose.Slides.PresentationFactory.

public static PresentationFactory Instance { get; }

Property Value

PresentationFactory

Methods

CreatePresentation()

Creates new presentation.

public IPresentation CreatePresentation()

Returns

IPresentation

New presentation

CreatePresentation(ILoadOptions)

Creates new presentation with additional load options

public IPresentation CreatePresentation(ILoadOptions options)

Parameters

options ILoadOptions

Load options

Returns

IPresentation

New presentation

GetPresentationInfo(string)

Creates new PresentationInfo object from file and binds presentation to it.

public IPresentationInfo GetPresentationInfo(string file)

Parameters

file string

Presentation file.

Returns

IPresentationInfo

Presentation info binded to presentation.

GetPresentationInfo(Stream)

Creates new PresentationInfo object from stream and binds presentation to it. Gets info about presentation in specified stream.

public IPresentationInfo GetPresentationInfo(Stream stream)

Parameters

stream Stream

Presentation stream.

Returns

IPresentationInfo

Presentation info binded to presentation.

GetPresentationText(string, TextExtractionArrangingMode)

Retrieves the raw text from the slides

public IPresentationText GetPresentationText(string file, TextExtractionArrangingMode mode)

Parameters

file string

Input file

mode TextExtractionArrangingMode

Extraction mode

Returns

IPresentationText

The instance of PresentationText containing the SlideText array representing the raw slides text

GetPresentationText(Stream, TextExtractionArrangingMode)

Retrieves the raw text from the slides

public IPresentationText GetPresentationText(Stream stream, TextExtractionArrangingMode mode)

Parameters

stream Stream

Input stream

mode TextExtractionArrangingMode

Extraction mode

Returns

IPresentationText

The instance of PresentationText containing the SlideText array representing the raw slides text

GetPresentationText(Stream, TextExtractionArrangingMode, ILoadOptions)

Retrieves the raw text from the slides

public IPresentationText GetPresentationText(Stream stream, TextExtractionArrangingMode mode, ILoadOptions options)

Parameters

stream Stream

Input stream

mode TextExtractionArrangingMode

Extraction mode

options ILoadOptions

Load options

Returns

IPresentationText

The instance of PresentationText containing the SlideText array representing the raw slides text

ReadPresentation(byte[])

Reads an existing presentation from array

public IPresentation ReadPresentation(byte[] data)

Parameters

data byte []

Array to read

Returns

IPresentation

Read presentation

ReadPresentation(byte[], ILoadOptions)

Reads an existing presentation from array with additional load options

public IPresentation ReadPresentation(byte[] data, ILoadOptions options)

Parameters

data byte []

Array to read

options ILoadOptions

Load options

Returns

IPresentation

Read presentation

ReadPresentation(Stream)

Reads an existing presentation from stream

public IPresentation ReadPresentation(Stream stream)

Parameters

stream Stream

Input stream to read

Returns

IPresentation

Read presentation

ReadPresentation(Stream, ILoadOptions)

Reads an existing presentation from stream with additional load options

public IPresentation ReadPresentation(Stream stream, ILoadOptions options)

Parameters

stream Stream

Input stream to read

options ILoadOptions

Load options

Returns

IPresentation

Read presentation

ReadPresentation(string)

Reads an existing presentation from file

public IPresentation ReadPresentation(string file)

Parameters

file string

File name

Returns

IPresentation

Read presentation

ReadPresentation(string, ILoadOptions)

Reads an existing presentation from stream with additional load options

public IPresentation ReadPresentation(string file, ILoadOptions options)

Parameters

file string

File name

options ILoadOptions

Load options

Returns

IPresentation

Read presentation