Welcome to the ASP.NET Core feedback portal. We’re happy you’re here! If you have feedback on how to improve the ASP.NET Core, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Hi,
The word document in attachment is a minimal example of a file that cannot be exported to html by Syncfusion.DocIO.DLS.HTMLExport.

It throws an error about an invalid character, but that character is not part of the Word text. I tried
  doc.Replace(System.Text.RegularExpressions.Regex("[\x00-\x08\x0B\x0C\x0E-\x1F]"),"")
but to no avail. When doing doc.GetText(), it does show up.

I'm using the latest version via NuGet 17.1.0.53


Trace:
System.ArgumentException: ' ', hexadecimal value 0x01, is an invalid character.
   at System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* pDst, Boolean entitize)
   at System.Xml.XmlUtf8RawTextWriter.WriteRawWithCharChecking(Char* pSrcBegin, Char* pSrcEnd)
   at System.Xml.XmlUtf8RawTextWriter.WriteRaw(String data)
   at System.Xml.XmlWellFormedWriter.WriteRaw(String data)
   at Syncfusion.DocIO.DLS.HTMLExport.WriteParagraphOrList(WParagraph para)
   at Syncfusion.DocIO.DLS.HTMLExport.WriteParagraph(WParagraph para)
   at Syncfusion.DocIO.DLS.HTMLExport.WriteTextBody(WTextBody body)
   at Syncfusion.DocIO.DLS.HTMLExport.WriteSection(WSection sec)
   at Syncfusion.DocIO.DLS.HTMLExport.WriteBody(WordDocument doc)
   at Syncfusion.DocIO.DLS.HTMLExport.WriteXhtml(WordDocument doc, String cssFileName)
   at Syncfusion.DocIO.DLS.HTMLExport.SaveAsXhtml(WordDocument doc, Stream stream, Encoding encoding)