Dear,
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");
try
{
presentation.save("C:/Users/muk/Desktop/PowerPoint-to-PDF.pdf", SaveFormat.Pdf);
}
finally
{
if (presentation != null) presentation.dispose();
}
You can download pptx and pdf files from here https://drive.google.com/file/d/1v_lwUYsTDBZM3wdF7K0dF7F2_6BtafKe/view?usp=sharing
@mukhan12,
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.
@mukhan12,
We are glad to know that the issue has been resolved on your end. Thank you for using Aspose.Slides.