The following code:
<p>Table 1:</p><figure class="table"><table style="border-bottom:10px solid hsl(120, 75%, 60%);border-left:10px solid hsl(120, 75%, 60%);border-right:10px solid hsl(120, 75%, 60%);border-top:10px solid hsl(120, 75%, 60%);"><tbody><tr><td style="background-color:hsl(60, 75%, 60%);text-align:center;">A1</td><td style="background-color:hsl(90, 75%, 60%);text-align:center;">B1</td></tr><tr><td style="background-color:hsl(30, 75%, 60%);text-align:center;">A2</td><td style="background-color:hsl(210, 75%, 60%);text-align:center;">B2</td></tr></tbody></table></figure>
In this code:
private static void GenerateFinalFile(string convertedHTML, string fileName, SaveFormat saveFormat)
{
Aspose.Words.Document finalDoc = new Aspose.Words.Document();
DocumentBuilder documentBuilder = new DocumentBuilder(finalDoc);
documentBuilder.InsertHtml(convertedHTML);
using (var docStream = new FileStream(string.Format(fileName, saveFormat), FileMode.OpenOrCreate))
{
finalDoc.Save(docStream, saveFormat);
}
}
Loses all the table formatting, irrespective of the target file type (docx, pdf, gif, etc). There was a problem with v17 reported some time ago that was allegedly fixed, however I am using the latest version (I had the same problem on v20 also).
Setting useBuilderFormatting to either true or false makes no difference. Anyone able to assist me please?