I used this type of code to generate Word and PDF:
'Specify HTML string
Dim xhtmlString As String = "<html><head><style type=""text/css"">li,p{font-family:'Lucida Sans Unicode';font-size:14pt;}</style></head><body><font size=""16pt"" color=""blue""><h2 align=""center"">Document Template</h2></font><p><b>Headings:</b></p><ul type=""disc""><li><span style='color:green;'>Main Heading</span></li><li>Sub Headings</li><li><span style='color:red'>Sub Sub Headings</span></li></ul></ul><table border=""1"" width=""90%""><tr><th>Steps to set Alt text for images</th></tr><tr><td>Right-click on the image.</td></tr><tr><td>Select Format Picture.</td></tr><tr><td>The Format Picture dialog box will appear. Select the Web tab</td></tr><tr><td>In the Alternative text box, type in the description of the image, then click OK.</td></tr></table></body></html>"
xhtmlString = html
'Initialize an instance of the Document class
Dim xdocument As Spire.Doc.Document = New Spire.Doc.Document
'Add a section
Dim xsection As Spire.Doc.Section = xdocument.AddSection()
'Add a paragraph
Dim xparagraph As Spire.Doc.Documents.Paragraph = xsection.AddParagraph()
'Append the HTML String to the paragraph
xparagraph.AppendHTML(xhtmlString)
'Save the result document
xdocument.SaveToFile("C:\Users\boma0504\Downloads\CMDP\HtmlStringToWord.docx", Spire.Doc.FileFormat.Docx2013)
xdocument.Dispose()
Until version 10.7.0 everything was going well.
But with version 10.7.16 or higher, the lines around the table become big dots!