We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Can't read Shadow properties


In the attached presentation there is only one portion of text with Outer Shadow effect set. I’m trying to get Shadow properties like BlurRadius, Distance, Direction…, but the objects holding them are null.

Here’s the code I used:

String presentationPath = “ShadowsTest.pptx”;

InputStream stream = new FileInputStream(presentationPath);

Presentation presentation = new Presentation(stream);


ISlide slide = presentation.getSlides().get_Item(0);

IAutoShape shape = (IAutoShape) slide.getShapes().get_Item(0);

IParagraph paragraph = shape.getTextFrame().getParagraphs().get_Item(0);

IPortion portion = paragraph.getPortions().get_Item(0);
System.out.println(portion.getPortionFormat().getEffectFormat().getInnerShadowEffect() == null);
System.out.println(portion.getPortionFormat().getEffectFormat().getOuterShadowEffect() == null);
System.out.println(portion.createPortionFormatEffective().getEffectFormat().getInnerShadowEffect() == null);
System.out.println(portion.createPortionFormatEffective().getEffectFormat().getOuterShadowEffect() == null);

Can you check this?


Hi Zeljko,

Thank you for your interest in Aspose.Slides.

I have observed your comments and like to share with you that I have made necessary changes to the code as per your requirements and request you to please try using following sample code on your end to serve the purpose.

String filePath = “D:\ShadowsTest.pptx”;
Presentation pres = new Presentation(filePath);
ISlide slide = pres.getSlides().get_Item(0);
IAutoShape shape = (IAutoShape) slide.getShapes().get_Item(0);
IOuterShadow Shadow = shape.getEffectFormat().getOuterShadowEffect();

I hope this will be helpful. Please share if I may help you further in this regard.

Best Regards,