Remove Table Indentation when Inserting HTML with Padding set for TH Table in Word Document using C# .NET

Hi,

I noticed issue, when using InsertHtml method. In my case th has padding set. When I checked the builded document, the table has LeftIndent set also, and in Word the Indent is set. When I opened html using Word, the table doesn’t have indent. So, I think that indent shouldn’t be set then when using InsertHtml method.
My case:

 var rawHtml = "<html>" +
                      "<body>" +
                      "<table border=\"1\">" +
                      "<tbody>" +
                      "<th style=\"padding: 0.16cm 0.19cm 0.05cm 0.19cm\">Header</th>" +
                      "<tr>" +
                      "<td>Text</td>" +
                      "</tr>" +
                      "</tbody>" +
                      "</table>" +
                      "</body>" +
                      "</html> ";

var _document = new Document().RemoveLicenseParagraph();
var _builder = new DocumentBuilder(_document);
_builder.InsertHtml(rawHtml, true);
_document.Save(@"D:\test_file.docx");

th_indent.zip (15.2 KB)

Could you check, please?

Thanks,
Mateusz

@acturisaspose,

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-20089. 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.