Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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