Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Convert PDF to PPT using Java
// For further examples, please visit https://github.com/aspose-slides-cloud/aspose-slides-cloud-java
// Get ClientID and ClientSecret from https://dashboard.aspose.cloud/
try
{
// Client credentials from https://dashboard.aspose.cloud/
String clientId = "bbf94a2c-6d7e-4020-b4d2-b9809741374e";
String clientSecret = "1c9379bb7d701c26cc87e741a29987bb";
// create an instance of SlidesApi
SlidesApi slidesApi = new SlidesApi(clientId,clientSecret);
// load file from local system
File f = new File("c://Users/shahbnay/Downloads/test.pdf");
// convert the file to Byte array
byte[] bytes = Files.readAllBytes(f.toPath());
// call method to convert PDF to PowerPoint
slidesApi.importFromPdf("myConverted.ppt",bytes,null,null,null);
// print success message
System.out.println("PDF sucessfully converted to PPT format !");
}catch(Exception ex)
{
System.out.println(ex.getStackTrace());
}
Learn how to convert PDF to PPT using Aspose.Slides Cloud SDK for Java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment