Background Is Not Applied for a PowerPoint Presentation Slide


I am converting some PDF to PPTX and applying a custom background to each slide after conversion. On one PDF the content is covering the background completely. I’ve shared the sample code and PDF that reproduces the problem.

var theme = new Presentation("src/main/java/" + themeName + ".pptx");

try (Document document = new Document("src/main/java/" + fileName + ".pdf")) {
    var secondPage = document.getPages().get_Item(2);
    var width = secondPage.getRect().getWidth();
    var height = secondPage.getRect().getHeight();

    // Set size of first page
    document.getPages().get_Item(1).setPageSize(width, height); + ".pptx", SaveFormat.Pptx);

    var presentation = new Presentation(fileName + ".pptx");

    var sourceSlide = theme.getSlides().get_Item(0);

    IMasterSlide sourceMaster = sourceSlide.getLayoutSlide().getMasterSlide();

    var slideMaster = presentation.getMasters().addClone(sourceMaster);

    for (var slide : presentation.getSlides()) {
        if (sourceSlide.getShowMasterShapes())
    for (var slide : presentation.getSlides()) {
    } + ".pptx", com.aspose.slides.SaveFormat.Pptx);
} (124.5 KB) (174.5 KB)

Could you please take a look into the issue?

Thank you for contacting support. I am working on the issue you described. I will get back to you ASAP.

As far as I can see, the background is applied correctly for every slide in the presentation, but a shape on the second slide completely covers the background. output.png (200.4 KB)
Could you please describe the problem?


Thanks for taking a look. Yeah, there is a shape covering the slide and hiding the background. But I think this shouldn’t be there. The second page is correctly converted without any page-spanning shape. Is the problem in the conversion or is the image on the PDF not correctly made?

Issue also exists in another PDF attached below:
Clinical Category Quality (5.9 MB)

Thank you for the explanation.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESJAVA-39124

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Please also share the following additional information:

  • OS version on which code was executed
  • JDK version in your app

You have shared the output presentation file. Could you please share the initial PDF file?

Please note that the shape completely covering the slide appears without using Aspose.Slides:

try (Document document = new Document("CC.pdf")) {
    var secondPage = document.getPages().get_Item(2);
    var width = secondPage.getRect().getWidth();
    var height = secondPage.getRect().getHeight();

    document.getPages().get_Item(1).setPageSize(width, height);"output.pptx", com.aspose.pdf.SaveFormat.Pptx);

I moved this forum thread to the Aspose.Pdf forum. My colleagues will check the issue and get back to you as soon as possible.


We have converted your PDF into PPTX while using 23.3 version of the API. Can you please open the attached PPTX file and share screenshot of the issue that you are noticing? This would help us in investigating the issue accordingly. (132.8 KB)