Html2OpenXml is a small .Net library that convert simple or advanced HTML to plain OpenXml components. This program has started in 2009, initially to convert user's comments into templated Word.
When I use HTMLtoOpenXML to convert this table, I lose the "background-color" style and I haven't been able to pinpoint why yet. I think it might be here in
TableStyleCollection.ProcessCommonAttributes:
var colorValue = en.StyleAttributes.GetAsColor("background-color");
// "background-color" is also handled by RunStyleCollection which duplicate this attribute (bug #13212). Let's ignore it
if (!colorValue.IsEmpty && en.CurrentTag.Equals("<td>", StringComparison.InvariantCultureIgnoreCase)) colorValue = System.Drawing.Color.Empty;
Has anybody else seen this happen to them? If so, how did you address the issue?
[copied from codeplex]
I am using the SDK 2.5/.NET 4.0 set. Consider the following HTML table:
When I use HTMLtoOpenXML to convert this table, I lose the "background-color" style and I haven't been able to pinpoint why yet. I think it might be here in
Has anybody else seen this happen to them? If so, how did you address the issue?