Convert PPTX to PPT in Java

Overview

This article explains how to convert PowerPoint Presentation in PPTX format into PPT format using Java. The following topic is covered.

  • Convert PPTX to PPT in Java

Java Convert PPTX to PPT

For Java sample code to convert PPTX to PPT, please see the section below i.e. Convert PPTX to PPT. It just loads the PPTX file and saves in PPT format. By specifiying different save formats, you can also save PPTX file into many other formats like PDF, XPS, ODP, HTML etc. as disscussed in these articles.

Convert PPTX to PPT

To convert a PPTX to PPT simply pass the file name and save format to the Save method of Presentation class. The Java code sample below converts a Presentation from PPTX to PPT using default options.

// instantiate a Presentation object that represents a PPTX file
Presentation presentation = new Presentation("template.pptx");

// save the presentation as PPT
presentation.save("output.ppt", SaveFormat.Ppt);