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

Free Support Forum - aspose.com

Why the default text font color is not black in the table cell?


I am using Java slides 15.11.0 to parse the pptx file. There is a question confuses me. The default text font color is not black in the table cell. But it should be black.
Here are the steps I created the pptx file.
1. create a new pptx file with MS office Power Point.
2. create a slide in the file.
3. create a 3 row 2 column table.
4. input some content in the table to fill the cell.
5.set the second column’s text font color to red.
6.the pptx file is in the attachment.

In power point, the font of the text in second row and first column cell is default black. I am not sure it is exactly black,but it look like black.
When I tried to get the font color with below code. It is not black

java.awt.Color[r=0,g=0,b=0] ,but it is java.awt.Color[r=79,g=129,b=189].

While the font of the text in second row and second column is right. It is red.

I am very confused by it.

Can anyone give me some idea? Thank you very much.

Here is the code.

String dataDir = "Z:\\Downloads\\aa_pptxtestfiles\\dingtestdata\\";

Presentation pres = new Presentation(dataDir+ "\\testSample_table.pptx");

ISlide sld = pres.getSlides().get_Item(0);

//Initialize null TableEx

ITable tbl = null;

//Iterate through the shapes and set a reference to the table found

for (IShape shp : sld.getShapes())

if (shp instanceof ITable)

tbl = (ITable)shp;

ITextFrame textFrame = tbl.getRows().get_Item(1).get_Item(0).getTextFrame();

System.out.println("text is:" + textFrame.getText() );

IPortion portion = textFrame.getParagraphs().get_Item(0).getPortions().get_Item(0);

Color color = portion.createPortionFormatEffective().getFillFormat().getSolidFillColor();

System.out.println("The color is:" + color.toString() );

ITextFrame textFrame2 = tbl.getRows().get_Item(1).get_Item(1).getTextFrame();

System.out.println("text is:" + textFrame2.getText() );

IPortion portion2 = textFrame2.getParagraphs().get_Item(0).getPortions().get_Item(0);

Color color2 = portion2.createPortionFormatEffective().getFillFormat().getSolidFillColor();

System.out.println("The color is:" + color2.toString() );

Best Regards,

Yuebin Ding

Hi Yuebin,

Thank you for your interest in Aspose.Slides.

I have observed your comments and worked with the data shared by you. I am unable to reproduce the issue on my end. I have attached a screenshot of output for your kind reference (see fine.JPG). I request you to please try using Aspose,Slides for Java 16.1.0 on your side and then share your kind feedback with us.

Please let us know if the issue persists. We will be glad to help you further.

Best Regards,

hi Adnan,

It seems OK with version 16.1.0. But still has problem with version 15.11.0.
Thank you very much.

Yuebin Ding

Hi Yuebin,

Thank you for your valuable feedback.

We are glad to hear that your issue is resolved and things have started working on your end.

Please feel free to contact us if we can be of any help to you.

Best Regards,