Aspose.Slides for Java: Converting PPTX to PDF Is Not Working

When I am converting pptx file to pdf, always I get corrupted pdf file.
I am using aspose-slides-19.3-jdk16.jar and this code

Presentation presentation = new Presentation("C:/Users/muk/Desktop/pptFile.pptx");

{"C:/Users/muk/Desktop/PowerPoint-to-PDF.pdf", SaveFormat.Pdf);
    if (presentation != null) presentation.dispose();

You can download pptx and pdf files from here

Thank you for contacting support.

I was unable to generate the corrupted PDF document using Aspose.Slides for Java 19.3 and 22.8. There were many updates after version 19.3. Please check your results using the latest version of Aspose.Slides if it is possible. If the issue persists, please share the following additional information:

  • OS version on which the conversion was performed
  • JDK version in your app

Dear Andrey,
Sorry , my mistake, “SaveFormat.Pdf” was imported from com.aspose.pdf.SaveFormat.
I changed it to com.aspose.slides.SaveFormat.
Now it is working.
Thanks for your kind and quick response.

We are glad to know that the issue has been resolved on your end. Thank you for using Aspose.Slides.