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

We got error when trying to open this word document, I dont know why this is happen on this attachment only.

Our code:

using Syncfusion.DocIO;

using PhysicalWordDocument = Syncfusion.DocIO.DLS.WordDocument;

using var file = File.OpenRead("D://a2.docx");

using var ms = new MemoryStream();

file.CopyTo(ms);

using PhysicalWordDocument contentDocument = new(ms, FormatType.Docx);


Exception:
System.ArgumentNullException: Value cannot be null. (Parameter 'Name')
   at Syncfusion.DocIO.DLS.Style.set_Name(String value)
   at Syncfusion.DocIO.DLS.Convertors.DocxParser.ParseStyleProperties(XmlReader reader, Style style, Dictionary`2 linkStyleNamesReferByCharacterStyle, List`1 paraLinkStyleIndex, String& styleNameId, String localName)
   at Syncfusion.DocIO.DLS.Convertors.DocxParser.ParseStyle(XmlReader reader, Dictionary`2 linkStyleNamesReferByCharacterStyle, List`1 paraLinkStyleIndex)
   at Syncfusion.DocIO.DLS.Convertors.DocxParser.ParseStyles(XmlReader reader)
   at Syncfusion.DocIO.DLS.Convertors.DocxParser.ParseDocument(Package wordPackage)
   at Syncfusion.DocIO.DLS.Convertors.DocxParser.Read(WordDocument document, Boolean isFlatOPC)
   at Syncfusion.DocIO.DLS.Convertors.DocxParser.Read(Stream docStream, WordDocument document)
   at Syncfusion.DocIO.DLS.WordDocument.OpenDocx(Stream stream)
   at Syncfusion.DocIO.DLS.WordDocument.OpenInternal(Stream stream, FormatType formatType, String password)
   at Archiving.WebJob.Domain.Renderers.WorkingPaper.Office.WordDocument..ctor(Stream content)