Read the complete article on how to convert PowerPoint presentations to SVG using Java: https://blog.aspose.com/2021/07/22/convert-powerpoint-to-svg-in-java/
Last active
August 27, 2021 16:24
-
-
Save aspose-com-gists/ae230d0365b5266a24fe1631a3542d15 to your computer and use it in GitHub Desktop.
Convert PowerPoint to SVG using Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Instantiate a Presentation class that represents the presentation file | |
Presentation pres = new Presentation("presentation.pptx"); | |
try { | |
// Access each slide | |
for(ISlide sld:pres.getSlides()) | |
{ | |
// Create a memory stream object | |
FileOutputStream svgStream = new FileOutputStream(String.format("slide_%d.svg", sld.getSlideNumber())); | |
// Generate SVG image of slide and save in memory stream | |
sld.writeAsSvg(svgStream); | |
// Close stream | |
svgStream.close(); | |
} | |
} catch (IOException e) { | |
} finally { | |
pres.dispose(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment