PowerPoint to SVG conversion is often performed to display the presentations in web or desktop applications. Various PowerPoint viewers also convert the presentations to SVG for slideshow. Accordingly, this article covers how to convert PowerPoint PPTX or PPT presentations to SVG files using Java.
- Java PowerPoint PPTX to SVG Converter - Free Download
- Steps to Convert PowerPoint PPT to SVG in Java
- Convert PPTX/PPT to SVG in Java
Java PowerPoint PPT to SVG Converter - Free Download
In order to convert PPTX or PPT presentations to SVG, we will use Aspose.Slides for Java. The API is designed to create and manipulate PowerPoint and OpenOffice presentations from within Java applications. Furthermore, it supports the high fidelity conversion of presentations to other formats including SVG. You can either download the API or install it using the following Maven configurations.
<repository> <id>AsposeJavaAPI</id> <name>Aspose Java API</name> <url>http://repository.aspose.com/repo/</url> </repository>
<dependency> <groupId>com.aspose</groupId> <artifactId>aspose-slides</artifactId> <version>21.8</version> <classifier>jdk16</classifier> </dependency>
Steps to Convert PPTX to SVG in Java
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 Java.
- 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 Java.
Convert PPTX or PPT Presentations to SVG in Java
The following are the steps to convert a PowerPoint PPTX/PPT presentation to SVG using Java.
- First, create an instance of Presentation class to load the presentation.
- Loop through the slides in presentation and get reference of each slide in ISlide object.
- Create a FileOutputStream object for the output SVG file.
- Write slide data to the FileOutputStream object using ISlide.writeAsSvg() method.
- Finally, close the stream.
The following code sample shows how to convert PowerPoint PPTX/PPT to SVG.
Java PPTX to SVG Converter - Get a Free License
You can use Aspose.Slides for Java without evaluation limitations by requesting a temporary license.
PPT to SVG - Online Demo
Try the online PowerPoint to SVG converter, which is based on Aspose.Slides.
The PowerPoint presentations are often converted to SVG to embed their content in the applications. For such cases, this article covered how to perform PowerPoint to SVG conversion in Java. You can visit the documentation to explore other features of Aspose.Slides for Java. Furthermore, you can feel free to let us know about your queries via our forum.