Class PresentationAnimationConverter
Represents the conversion of PowerPoint slide to series of images based on animation order.
Inheritance
System.Object
PresentationAnimationConverter
Implements
System.IDisposable
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.PresentationRenderer.NET.dll
Syntax
public class PresentationAnimationConverter : Object, IDisposable
Constructors
PresentationAnimationConverter()
Declaration
public PresentationAnimationConverter()
Methods
Convert(ISlide, ExportImageFormat)
Converts a PowerPoint slide to a series of images based on animation effects.
Declaration
public Stream[] Convert(ISlide slide, ExportImageFormat imageFormat)
Parameters
Type | Name | Description |
---|---|---|
ISlide | slide | |
ExportImageFormat | imageFormat | Specifies the image format to convert the slide. |
Returns
Type | Description |
---|---|
System.IO.Stream[] | Returns an array of stream instance that represents the converted slide. |
Remarks
This method saves each animation step as a separate image file based on the animation order. Supported only the Entrance animation effects.
Dispose()
Releases all resources used by the object.
Declaration
public void Dispose()
Examples
//Open a PowerPoint Presentation.
IPresentation pptxDoc = Presentation.Open("Input.pptx");
//Initialize the PresentationAnimationConverter to perform slide to image conversion based on animation order.
PresentationAnimationConverter animationConverter = new PresentationAnimationConverter();
int i = 0;
foreach (ISlide slide in pptxDoc.Slides)
{
//Convert the PowerPoint slide to a series of images based on entrance animation effects.
Stream[] imageStreams = animationConverter.Convert(slide, Syncfusion.Drawing.ImageFormat.Png);
//Save the image stream.
foreach (Stream stream in imageStreams)
{
//Dispose the stream.
stream.Dispose();
}
}
//Close the Presentation
pptxDoc.Close();
//Dispose the instance.
animationConverter.Dispose();
'Open a PowerPoint Presentation.
Dim pptxDoc As IPresentation = Presentation.Open("Input.pptx")
'Initialize the PresentationAnimationConverter to perform slide to image conversion based on animation order.
Dim animationConverter As PresentationAnimationConverter = New PresentationAnimationConverter()
Dim i As Integer = 0
For Each slide As ISlide In pptxDoc.Slides
'Convert the PowerPoint slide to a series of images based on entrance animation effects.
Dim imageStreams As Stream() = animationConverter.Convert(slide, Syncfusion.Drawing.ImageFormat.Png)
'Save the image stream.
For Each stream As Stream In imageStreams
'Dispose the stream.
stream.Dispose()
Next
Next
'Close the Presentation
pptxDoc.Close()
'Dispose the instance.
animationConverter.Dispose()
Implements
System.IDisposable