Retain Background Transparency of Images in Generated RTF during Report Building using LINQ Engine (C# .NET)

Hi,
I believe I’ve stumbled upon a bug.
I’m building a document using LINQ Engine based on a DOCX template. The template contains textboxes to hold images in them using the syntax: <<image [image_expression] -keepRatio>>. The images in the model have transparent backgrounds.

When the document is saved as an RTF file, the text field containing the image is set to have “black” as its fill color. When I edit the RTF to remove the fill color, I can see the image properly. Please note that the original DOCX template doesn’t have a fill color set for the textbox so not sure how this is getting added.

Here’s how the field looks like in the output document:
image.png (14.9 KB)

and this is the textbox properties:
image.png (38.9 KB)

I’ve attached a project to reproduce this, it is ready to use. Just open in Visual Studio and press F5 to build and run. The output will be in the bin folder under the “Templates” directory.

I’d like to know if there’s an option to control this behavior and disable it or if it is a bug with Aspose.Words .NET. Also note that this running on the most recent version of the library.

Thanks,

Repro Project: ConsoleApp.zip (38.5 KB)

@raphaelyousuf,

We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-20548. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

@awais.hafeez

Thank you for the reply and confirming the issue.

The issues you have found earlier (filed as WORDSNET-20548) have been fixed in this Aspose.Words for .NET 20.11 update and this Aspose.Words for Java 20.11 update.