Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Created October 7, 2024 15:18
Show Gist options
  • Save aspose-com-gists/edf806fcc4f74ccc982bed9536995c0d to your computer and use it in GitHub Desktop.
Save aspose-com-gists/edf806fcc4f74ccc982bed9536995c0d to your computer and use it in GitHub Desktop.
Convert ODP to PPTX
public class main
{
public static void main(String[] args)
{
// Path to the working directory.
String dir = "/Desktop/";
// Set the path to output file.
String outFile = dir+"output.pptx";
// Initialize an object of the Presentation class with the source ODP file.
Presentation pr = new Presentation(dir + "file.odp");
try {
// Call the save method to save the ODP file as PPTX file.
pr.save(outFile, SaveFormat.Pptx);
} finally {
if (pr != null) pr.dispose();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment