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

Free Support Forum - aspose.com

Retrieve FillFormat for AutoshapeEx


I’m using Aspose.Slides as an import tool to convert PPT/PPTX into our data model.
The problem I’m recently struggeling with is, that whenever the shapes in the pptx file have not been formatted by the user, e.g. when the user has only added a simple form to the slide, the following code snippet will always return -1. That says the filling is an image.
AutoShapeEx autoShapeEx = (AutoShapeEx) shape;
byte filling = autoShapeEx.getFillFormat().getFillType();
I’m currently using MS Office 365 Premium to create my test files.
Is there any means to resolve that?

Best regars,

Hi Melanie,

I have worked with the presentation file shared by you and tried using the following sample code on my end to get the FillFormat of the shapes. The first shape is returned -1 as FillFormat type which seem to be an issue. An issue with ID SLIDESJAVA-34237 has been created in our issue tracking system to further investigate and resolve the issue. There is no issue while accessing the FillFormat for second slide shape with brown shade.

public static void TestShape()
String path=“D:\Aspose Data\”;
PresentationEx pres=new PresentationEx(path+“simple2FormTest.pptx”) ;

SlideEx slide=pres.getSlides().get_Item(0);

ShapeEx shape=null;
for(int i=0;i<slide.getShapes().getCount();i++)

if(shape instanceof AutoShapeEx)
AutoShapeEx ashp=(AutoShapeEx)shape;

byte fill=ashp.getFillFormat().getFillType();

Color colo=ashp.getFillFormat().getSolidFillColor().getColor();


This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

The issues you have found earlier (filed as SLIDESJAVA-34237) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.