I can download and open my docx file but can't preview it from browser. I can't find what's wrong. Any help would be much appreciated.
I attached my docx file
Here is where I get the error:
WordDocument doc = WordDocument.Load(stream, FormatType.Docx);
And here is the stack trace:
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 Syncfusion.DocIO.DLS.WordDocument.OpenInternal(Stream stream, FormatType formatType, XHTMLValidationType validationType)
Hi K,
We
have reproduced the reported problem with “NullReferenceException is thrown while
loading a document” in our end, and we suspect it to be a defect. We will
validate this issue and update you with more details on 18th October
2022.
Regards,
Akash A
OK. Thank you.
Hi K,
We have confirmed that the reported issue “NullReferenceException
is thrown while opening a DOCX format document” is a defect
and we have logged a defect report. We will include the fix for this defect in
our weekly NuGet release which is estimated to be available on 01st November
2022.
The status of this bug can be tracked through the below link:
https://www.syncfusion.com/feedback/38491/nullreferenceexception-is-thrown-while-opening-a-docx-format-document
Disclaimer: “Inclusion of this solution in the weekly release may change due to
other factors including but not limited to QA checks and works
reprioritization.”
Regards,
Akash A
We have included the reported issue with “NullReferenceException
is thrown while opening a DOCX format document” in our 2022 Volume 3
Service Pack Release. We are glad to announce that our Essential Studio 2022
Volume 3 Service Pack Release V20.3.0.56 is rolled out and is available for
download under the following link.
https://www.syncfusion.com/forums/178709/essential-studio-2022-volume-3-service-pack-release-v20-3-0-56-is-available-for-download
The status of the issue can be tracked through below feedback link.
https://www.syncfusion.com/feedback/38491/nullreferenceexception-is-thrown-while-opening-a-docx-format-document
We thank you for your support and appreciate your patience in waiting for this
release. Please get in touch with us if you require any further assistance.