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 PPT to SVG Converter - Free Download
- Steps to Convert PowerPoint PPT to SVG in C#
- Convert PPTX/PPT to SVG in C#
C# PowerPoint PPTX to SVG Converter - Free Download
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
Steps to Convert PowerPoint PPT to SVG in C#
The conversion of PowerPoint PPT or PPTX presentations to SVG is as simple as pie. The following are the steps that are required to convert a PPT/PPTX file to SVG format using Aspose.Slides for .NET.
- Load the PowerPoint PPT or PPTX file from disk.
- Loop through slides in the presentation.
- Save each slide as SVG file to desired location.
Now, let’s have a look at how to convert these steps into the code to convert a PPTX to SVG in C#.
Convert PowerPoint PPTX to SVG in C#
The following are the steps to convert a PowerPoint PPT to SVG in 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 C# code sample shows how to convert PowerPoint PPTX/PPT to SVG.
C# PPTX to SVG Converter - Get a Free License
You can use Aspose.Slides for .NET without evaluation limitations by requesting a free temporary license.
PowerPoint PPT to SVG - Online Demo
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.