I faced issue with conversion this html file example.zip (10.8 KB)
The second image is absent(or invisible) in resulting docx document. Can you please tell me how to fix it?
@VitaliyT85 The behavior is expected. As I can see the attached HTML is produced by Aspose.Words and has Aspose.Words specific CSS attributes required for better document roundtrip. In this particular case there is -aw-import: ignore;
attribute, which instructs Aspose.Words to ignore the element.
Thank you for quick answer! How can I make Aspose.Words not to use this attribute?
@VitaliyT85 Try disabling HtmlSaveOptions.ExportRoundtripInformation
options which is enabled by default:
HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
htmlSaveOptions.ExportRoundtripInformation = false;
doc.Save(@"C:\Temp\out.html", htmlSaveOptions);
Thank you! It helped.
1 Like