Hello Aspose team,
we are using Aspose.Slides for Java among other parts of your toolbox. As we established integration tests that show that after updates of Aspose our core conversion features for our app are still working, we experience that with the upgrade of Aspose.Slides from 24.8 to 25.6 the specific test for converting a pptx to pdf produces unstable results that are hard to assert for correctness (almost 5% of the pixels, when converting to an image afterwards are different, but not constantly). Surprisingly, the ppt to pdf conversion still creates totally stable (100%) stable results.
Can you explain that behavior?
Can you give us hints how to make our conversion code more stable?
Our code:
Presentation presentation = new Presentation(inputStream);
presentation.save(outputStream, SaveFormat.Pdf, new PdfOptions());
These are the two test PowerPoint files:
slides.zip (66.7 KB)
We are executing the tests on a Linux system as part of our nightly integration tests.
Thanks a lot for your help!
Kind regards, Stefan Raubal
@sraubal
Hello Stefan,
The instability you’re experiencing when converting PPTX files to PDF with Aspose.Slides may stem from various factors, including changes in rendering algorithms or differences in how specific elements are processed between versions. Since you mentioned that PPT to PDF conversion remains stable, it suggests that the issue may be specific to the PPTX format or certain features within your presentations.
To improve the stability of your conversion code, consider the following suggestions:
-
Update to the Latest Version: Ensure you are using the latest version of Aspose.Slides, as updates often include bug fixes and improvements.
-
Use PdfOptions: You can customize the PdfOptions
to control the output quality and other settings. For example, you might want to set the JpegQuality
or TextCompression
properties to see if they affect the output stability.
Here’s an example of how to set these options:
PdfOptions pdfOptions = new PdfOptions();
pdfOptions.setJpegQuality(90); // Set JPEG quality
pdfOptions.setTextCompression(TextCompression.Flate); // Set text compression
presentation.save(outputStream, SaveFormat.Pdf, pdfOptions);
-
Test with Different Presentations: If possible, test with a variety of PPTX files to identify if the issue is related to specific content or features in the presentations.
-
Check for Known Issues: Review the Aspose.Slides release notes and forums for any known issues related to the version you are using. Sometimes, specific features may have known bugs that are documented.
-
Contact Support: If the problem persists, consider reaching out to Aspose support with detailed information about the issue, including sample files and the specific differences you are observing.
By following these steps, you may be able to enhance the stability of your conversion process.
Kind regards!