Export slides to SVG

Overview

Write a slide as SVG when you need a graphic that can scale without turning all of its content into a bitmap. Text can remain SVG text, making the result useful for browser display and other workflows that accept vector graphics.

Usage example

This C# example uses Aspose.Slides for .NET. It creates a slide containing a text rectangle and writes that slide to slide.svg. It also keeps source.pptx for editing; the SVG is a scalable viewing output.

For setup, see Install Aspose.Slides for .NET.

using System.IO;
using Aspose.Slides;
using Aspose.Slides.Export;

using var presentation = new Presentation();
var slide = presentation.Slides[0];
var title = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 40, 40, 500, 80);
title.Name = "Title";
title.TextFrame.Text = "Hello";
presentation.Save("source.pptx", SaveFormat.Pptx);
using var stream = File.Create("slide.svg");
presentation.Slides[0].WriteAsSvg(stream);

FAQ

Are the fonts embedded in the SVG?

The SVG names the fonts it uses. Make those fonts available where the SVG is displayed so its text keeps the intended appearance.

Will an SVG contain embedded raster images?

It can. Raster pictures in the source may remain embedded raster content inside the SVG. Vector export does not turn photographs into vector shapes.

Can I save one SVG for each slide?

Yes. Iterate through the slide collection and write each slide to its own SVG file. Give each output a unique filename.

Guides

Related feature: Load fonts from a folder.

All features