Aspose.Words drops the table cell fill color when converting Rich Text Files (RTF)

While converting RTF to PDF we are loosing table cell shading ( becoming white color). This is happening even if we change color of one table header cell then entire table header colors in PDF getting white color.

@hdv

It seems you are experiencing an issue with Aspose.Words where the table cell fill color is lost when converting Rich Text Files (RTF) to DOCX and PDF formats. This problem appears to be specific to RTF files created in Word 2019/365 from version 2505 (Build 18827.20128) onward.

To troubleshoot this issue, you can try the following steps:

  1. Update Aspose.Words: Ensure you are using the latest version of Aspose.Words, as updates often include bug fixes and improvements.

  2. Check RTF Formatting: Open the RTF file in a text editor and verify the formatting codes related to table cell shading. Sometimes, the issue may stem from how the RTF is structured.

  3. Use Alternative Formats: If the issue persists, consider converting the RTF to another format (like DOCX) first, and then to PDF. This can sometimes preserve formatting better.

  4. Sample Code: Here’s a minimal code snippet to convert RTF to DOCX and then to PDF:

    Document doc = new Document("input.rtf");
    doc.save("output.docx");
    doc.save("output.pdf");
    
  5. Contact Support: If none of the above solutions work, consider reaching out to Aspose support with a sample RTF file that reproduces the issue. They may provide a more specific solution or workaround.

For further assistance, you can refer to the Aspose documentation or community forums for similar issues and solutions.

@hdv Could you please zip and attach your problematic input RTF document here for testing? We will check the issue and provide you more information.

02_PSG Report_BBSC.zip (78.1 KB)

Hi Attached RTF. Please help on this issue.

@hdv Thank you for additional information. The problem is not reproducible on my side using the latest 25.10 version of Aspose.Words. Please try using the latest version and let us know if the problem still persists on your side.

Hi, tried with 25.1 version , i am getting “The subscription included in this license allows free upgrades until 25 May 2017, but this version of the product was released on 01 Oct 2025. Please renew the subscription or use a previous version of the product.” exception.
Aspose.Wordsfor.NET.zip (1014 Bytes)

I am using attached temp licensce

@hdv The exception means your license subscription has been expired. Every Aspose license provides a 1-year subscription for free upgrades to any new Aspose.Words version that comes out.

You can check the license expiration date by opening the license file in Notepad (but take care not to modify and save the license file or it will no longer work) and checking the SubscriptionExpiry field.

<SubscriptionExpiry>20220218</SubscriptionExpiry>

It means that you can free upgrade to version of Aspose.Words published before 02/18/2022.

The license file you have attached should allow updating to the latest version of Aspose.Words. It looks like your code uses some other license file.

That’s working fine now. Thanks for the help.

1 Like

Hi Team, as this issue is happening with word version grater than 2504 and even though above solution (upgrading to latest Aspose dll) is working fine, but is there any possibility to fix this issue without upgrading dll as the application is in market and change of dll requires time. So is there any work around that we can do with RTF document?

@hdv No, unfortunately, there is no workaround for this issue. Older versions of Aspose.Words did not handle the way cell background is written to RTF by new version of MS Word. So to make it work you should update to the latest version of Aspose.Words.