Automatic font color issues in shapes

Hi,
I’ve found an issue with invisible(white on white background) fonts in shapes when font color is set to automatic. The issue however seems to occur only in specific cases. Here is a small demo with some examples:
ShapeFontColorExample.zip (29.3 KB)
From all four test cases, the issue only occurs in the document named “LoadedFirstTemplateDocument.docx” This particular document is different from the others. In this one the shape is defined in the underlying OOXML by using <w:drawing> tag inside <mc:AlternateContent>, when in all the other documents the shapes are defined by using <w:pict> tag. Why a different(and apparently problematic) shape definition is created for that document?
I also printed AutoColor properties for the texts inside shapes for all of the documents. In every case the property returns ARGB(255, 00, 00, 00), which translates to black, but clearly the font in “LoadedFirstTemplateDocument.docx” is not black. This was found on Aspose.Words for .NET version 22.8. On the most recent version(23.9) the issue also seems to occur in a code created document. On that version the code created document also contains the <w:drawing> tag instead of <w:pict>

Could you please take a look?

Thanks

@acturisaspose
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): WORDSNET-26032

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.

The issues you have found earlier (filed as WORDSNET-26032) have been fixed in this Aspose.Words for .NET 23.12 update also available on NuGet.

Hi,

Checked on version 24.9 - now the returned color is in line with the color displayed, but it seems that the autoColor should be setting to black when the background shape has its color changed to white - which works for LoadedFirstInsertNodeTemplate.docx but not for CodeCreated.docx, LoadedFirstTemplate.docx and LoadedSecondTemplate.docx. could you have a look please?

@acturisaspose
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): WORDSNET-27409

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.

@acturisaspose We have completed analyzing the issue. Aspose.Words creates a new document from the Word 2003 template. However, DocumentBuilder.InsertShape() inserts always DML shape. Word in this case has an option either to convert document to the latest version or still leave it in compatibility mode. When document is in compatibility mode, Word inserts VML shape, otherwise DML. For DML shapes Word gets font color from the <wps:style>. When Rectangle DML shape is created in Word (and Aspose.Words as well) the Style is filled with default values and font color in this case is White. However, the customer expects in this case color Black. If create TextBox shape instead of Rectangle, then Word and Aspose.Words dont fill Style` with default values and color is Black. So, in all these cases the behavior is the same in Word and Aspose.Words.

Looks like this is Not a Bug. Probably, you can insert TextBox shape, instead of Rectangle .