We are seeing the HtmlExportOptions.CssStyleSheetType not really having an effect on the Word ==> HTML conversion. I'm doing it in the following way.
- Code: Select all
doc.LoadFromStream(fileToConvert, Spire.Doc.FileFormat.Auto);
doc.HtmlExportOptions.ImageEmbedded = true;
doc.HtmlExportOptions.CssStyleSheetType = CssStyleSheetType.Internal;
doc.SaveToStream(stream, Spire.Doc.FileFormat.Html);
The issue is that the converted response HTML is used on the existing HTML page to display the converted document in a dialog and the styles returned with the conversion include the body css { font-family:'Times New Roman'; font-size:1em; } in the <style> element. This conflicts with the overall pages styles and changes the page font everywhere. Do you have any suggestions on how to deal with this?
It's difficult to upload the code as it's part of a WCF service and we use streams. Changing the CssStyleSheetType to External also has no effect.
Thanks.
Kal.