Hello,
Textboxes that have Fill, Shadow and ‘Soft Edges’ formats appear with a dark background when converted to PDF.
This behavior can be seen in the latest Aspose Slides for Java version 20.2, the attached “DarkShading.pptx” file and the following Java code:
final String pptxFile = [PATH] + "DarkShading.pptx";
final String pdfFile = pptxFile.replace(".pptx", ".pdf");
Files.deleteIfExists(Paths.get(pdfFile));
Presentation ppt = new Presentation(pptxFile);
ppt.save(pdfFile, SaveFormat.Pdf);
System.out.println("Saved PDF File: " + pdfFile);
Specifically, the culprit seems to be the ‘Soft Edges’ format. The PPTX has two almost identically formatted textboxes. However, one does not have the ‘Soft Edges’ format, the other does. If you look at the generated PDF, the textbox with the ‘Soft Edges’ format is completely dark (and its text is unreadable).
I should also mention that this applies to all Shapes - not just textboxes. So any Shape with Fill, Shadow and ‘Soft Edges’ format is subject to this issue.
Environment Details:
- Aspose Slides for Java 20.2
- Java version 1.8.0_211
- Windows 10 OS (but also reproducible under Linux).
File description in DarkShading.zip (108.6 KB) Attachment:
- DarkShading.pptx: Presentation to be converted to PDF.
- DarkShading.pdf: PDF file generated from the code above on our environment
- FormatShapeSettings.png: Screen shot of Shape Effects settings for textbox that becomes dark in the PDF.
Thank you!