Conversion Form Docx File to HTML Content

While Converting Docx file to HTML Content we are getting special characters within the span attribute like : "<span style="font-family:Verdana; -aw-import:ignore"> . please let us know when we will get these characters.strong text. here attaching sample code samplecode.pdf (1.5 KB)

@varungunjahalli

The HtmlSaveOptions.ExportRoundtripInformation property specifies whether to write the roundtrip information when saving to HTML, MHTML or EPUB. By default, the value of this property is true. So, the roundtrip information is exported as -aw-* CSS properties of the corresponding HTML elements. You can set the value of this property to false as shown below to avoid these attributes in output HTML.

Document doc = new Document(MyDir + "in.docx");
HtmlSaveOptions options = new HtmlSaveOptions { ExportRoundtripInformation = false };

doc.Save("out.html", options);
1 Like