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

Free Support Forum - aspose.com

Html rendering problem (td background color is not working)


I am trying to render HTML text to PDF, that text contains bgcolor for td (ex.

), but it is not appearing in the generated pdf.

Quick help will be appreciated.



I've tested the scenario and I am unable to reproduce the problem. Please make sure the HTML file is in correct formatting. The version of Aspose.Pdf that I've used is
Please try using the following HTML file and code snippet and in case you still face any problem, please share the code snippet that you are using.

I am not sure either you are using InLineHTML or converting HTML file into PDF, please elaborate. The resultant PDF that I've generated is in attachment, please take a look.


<table border="1">


<td bgcolor="#FF0000">January
<td bgcolor="#c7e6fb">$100

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />


Pdf pdf = new Pdf();




Thanks for reply, I am using inlineHTML and aspose.pdf ( I have used the same html code snipet given by you (by putting the html code in database) and still the problem exists. I am sharing the code hereunder:

Aspose.Pdf.TextInfo tiKOF = new Aspose.Pdf.TextInfo();

tiKOF.FontName = "Arial";

tiKOF.FontSize = 10;

string content = Convert.ToString(_oDSet.Tables[0].Rows[0]["KF_Desc"]);

content = CI.PDF_Utility.FormatTextforPDF(content);

Aspose.Pdf.Text tKOF = new Aspose.Pdf.Text(content, tiKOF);

tKOF.IsHtmlTagSupported = true;

tKOF.IsSpaced = true;

tKOF.Margin.Top = 3;

tKOF.Margin.Bottom = 2;



I have tested the issue and I’m able to reproduce the same problem. I have logged it in our issue tracking system as PDFNET-8912. We will investigate this issue in detail and will keep you updated on the status of a correction. We apologize for your inconvenience.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />


Thanks you for considering Aspose.Pdf.

I have fixed this problem, and the solution has been submitted to corresponding developer. Please wait for the hotfix.


The bug has been fixed in our current build. Please try the attached
dll before we publish new hotfix. Thanks for your patience.

Best regards.

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

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Good Work,

But i m Facing problem when Worked with background image , the Following is my code but when generate a pdf it given a Black Area instead of Image

Picture name
Author name
Date Created

Hello Imran,

Thanks for your interest in our products.

I have tested the scenario while adding image file as Background to table object and I am able to notice that resultant PDF does not contain background image. For the sake of correction, I have logged this issue as PDFNEWNET-30600 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. We are sorry for your inconvenience.