PowerPoint to SVG conversion is often used to embed the content of the slides in web or desktop applications. Various online PowerPoint viewers also convert the presentations to SVG for slideshow. In accordance with that, this article covers how to convert PowerPoint PPTX/PPT presentations to SVG format using C#.
C# PowerPoint Presentation to SVG Converter
Aspose.Slides for .NET is designed to create and manipulate PowerPoint and OpenOffice presentations from within .NET applications. In addition, the API allows you to convert presentation documents to other formats such as SVG. You can either download the API or install it using NuGet.
PM> Install-Package Aspose.Slides.NET
Convert PPTX/PPT Presentations to SVG in C#
The following are the steps to convert a PowerPoint PPTX/PPT presentation to SVG using C#.
- First, create an instance of Presentation class to load the presentation.
- Loop through the slides in Presentation.Slides collection.
- Get the reference of each slide in ISlide object.
- Write slide into a MemoryStream object using ISlide.WriteAsSvg() method.
- Create a Stream object for resultant SVG file.
- Write SVG data from MemoryStream object to SVG file’s stream.
- Finally, close the stream.
The following code sample shows how to convert PowerPoint PPTX/PPT to SVG.
Get a Free API License
You can use Aspose.Slides for .NET without evaluation limitations by requesting a temporary license.
Try the online PowerPoint to SVG converter, which is based on Aspose.Slides.
The slides in PowerPoint presentations are often converted to SVG for presentation viewers. For such use cases, this article covered how to convert PowerPoint presentations to SVG using C#. You can also visit the documentation to explore other features of Aspose.Slides for .NET. Also, you can feel free to let us know about your queries via our forum.