DocX
DocX copied to clipboard
DocX.Load() failed for specific file
Object reference not set to an instance of an object.
Xceed.Words.NET.DocX.PopulateDocument(DocX document, Package package) Xceed.Words.NET.DocX.PostLoad(Package& package) Xceed.Words.NET.DocX.Load(String filename)
I cant upload the file to public as its content is private. How I can play with the file to find the internal problem?
I was tried to edit the file with Word, works Tried to open >save with Word, the file is processed OK. I suspct the origin file, but do not know how to test it.
Inb4 - "try out the trial version of this etcetc."
We are facing the same issue and here is a document that fails to load. TC74625.docx
Hi MrDaedra, Thank you for reporting this. It will be fixed in v1.8. In the meantime, here's how to fix it. You can: -load a document which contains "docDefaults" (it is not the case in TC74625.docx) -go in file Xceed.Document.NET/Src/Document.cs, in method "PopulateDocument" and make sure the "document._styles.Root.Element( XName.Get( "docDefaults", Document.w.NamespaceName ) )" is not null before getting its "Element( XName.Get( "pPrDefault", Document.w.NamespaceName ) )".
Thank you