Multiple Discrepancies When Saving a Presentation Slide as an Image in Java

Hello,

I’m trying to save each slide from a PowerPoint presentation as an image, but there are several discrepancies.

Could you please confirm whether this is a bug?

Thank you

Code:

new Presentation("/path/to/charts.pptx").getSlides().forEach(slide ->
        slide.getImage(new Dimension(1820, 1040)).save("/path/to/slide"+slide.getPresentation().getSlides().indexOf(slide)+1+".jpg", ImageFormat.Jpeg));

Attached a PowerPoint document along with images with explanations for each slide
slides.zip (6.9 MB)

@dfinsolutions

It appears you are encountering discrepancies when saving slides from a PowerPoint presentation as images. This issue may arise from various factors, including the rendering process or specific slide content.

To troubleshoot, consider the following steps:

  1. Check Slide Content: Verify that the content on the slides (such as images, shapes, or text) is not causing rendering issues. Complex elements may sometimes not render as expected.

  2. Image Dimensions: The dimensions you are using (1820x1040) could affect the quality or rendering of certain elements. Experiment with different dimensions to see if it improves the output.

  3. Update Aspose.Slides: Ensure you are using the latest version of Aspose.Slides, as updates often include bug fixes and enhancements.

  4. Use Different Image Formats: If discrepancies persist, try saving the slides in different image formats (such as PNG) to determine if the issue is format-specific.

Here’s a modified version of your code that includes a check for the slide index:

new Presentation("/path/to/charts.pptx").getSlides().forEach(slide -> {
    int slideIndex = slide.getPresentation().getSlides().indexOf(slide) + 1;
    slide.getImage(new Dimension(1820, 1040)).save("/path/to/slide" + slideIndex + ".jpg", ImageFormat.Jpeg);
});

If the problem continues, consider reaching out to the Aspose support forum with specific details about the discrepancies and the content of the slides for further assistance.

@dfinsolutions,
Thank you for contacting free support. I need some time to investigate the issue. I will get back to you as soon as possible.