Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active September 20, 2021 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/218bd79bdb6c8c165463285735710384 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/218bd79bdb6c8c165463285735710384 to your computer and use it in GitHub Desktop.
Convert PowerPoint Presentations to SVG using C++
// Source file path
const String sourceFilePath = u"SourceDirectory\\Slides\\SamplePresentation.pptx";
// Load the presentation file
auto presentation = System::MakeObject<Presentation>(sourceFilePath);
// Loop through the slides
for (SharedPtr<ISlide> slide : presentation->get_Slides())
{
// Create an instance of the FileStream class
SharedPtr<FileStream> stream = File::OpenWrite(String::Format(u"OutputDirectory\\PresentationToSvg_out_{0}.svg", slide->get_SlideNumber()));
// Write the slide to the stream
slide->WriteAsSvg(stream);
// Close the stream
stream->Close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment