How to Convert SVG to Presentation using Java

In this simple topic, we will demonstrate to you how to convert SVG to Presentation using Java. The application can be used in any of the Java configured environments inside Windows, Linux or macOS for converting SVG to PPTX in Java seamlessly and without any dependence on any third party software.

Steps to Export SVG to PPTX in Java

  1. Configure your application to add Aspose.Slides for Java from the repository manager
  2. Instantiate an instance of the Presentation class to create a default presentation
  3. Load the first slide inside the presentation slides collection
  4. Open and read the SVG file content and insert that into the presentation images collection
  5. Insert a picture frame shape inside the slide with added SVG image
  6. Save the presentation having an SVG image on the disk

By following the above steps in Java saving SVG as PPT presentation can be performed easily. The process is initiated by creating a new presentation using the Presentation class instance and accessing the first slide inside the slides collection. Subsequently, the source SVG file content is read and added to an instance of the IPPImage class inside the presentation images collection. The added image is then inserted inside a picture frame shape and then the presentation is saved on the disk in PPTX format.

Code to Convert SVG to PPTX in Java

By utilizing the above code in Java SVG to PowerPoint presentation conversion can be easily performed using a simple API interface. You may create a new presentation or load an existing presentation and may insert the SVG image at any desired position inside any slide along with setting any custom size for the image too. The source SVG image can be loaded as a memory stream from sources like the web or databases as well.

This topic entails how to insert SVG in Presentation using Java. If you are interested in learning about adding a table inside the PowerPoint presentation, refer to the article on how to insert a table in slide using Java.