Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Fri Apr 07, 2023 5:14 pm

Unable to load document (see attachment) due to Spire.doc.dll exception.

Code:

Spire.Doc.Document document = new Spire.Doc.Document();
document.LoadFromFile(sourceFiles[0], FileFormat.Doc);
document.SaveToFile(targetFile, Spire.Doc.FileFormat.PDF);

Exception:

Cannot insert an object of type CustomXml into the Body
at Spire.Doc.Collections.DocumentObjectCollection.OnInsert(Int32 index, DocumentObject entity)
at Spire.Doc.Collections.DocumentObjectCollection.Add(IDocumentObject entity)
at spr⌯.ᜂ(spr⓰ A_0)
at spr⌯.ᜃ(spr⓰ A_0)
at spr⌯.ᜂ(spr⓰ A_0)
at spr⌢.ᜀ(spr⓰ A_0)
at spr⌢.ᜁ(spr⓰ A_0)
at spr〈.ᜄ()
at Spire.Doc.Document.᜖(String A_0)
at Spire.Doc.Document.LoadFromFile(String fileName, FileFormat fileFormat, String password)
at Spire.Doc.Document.LoadFromFile(String fileName, FileFormat fileFormat)
at MQS.Core.Documents.SpireDocToPdfConverter.Convert(String[] sourceFiles, String targetFile, Dictionary`2 options)

Product Version:

Spire.Doc v11.3.1

ronald.vandulek
 
Posts: 3
Joined: Thu Apr 06, 2023 1:59 pm

Mon Apr 10, 2023 9:59 am

Hi,

Thanks for your message.
Kindly note that our product is based on the Microsoft Word standard. There is an error message displayed even directly opening your document by Microsoft Word. You can verify this on your side. Thus, please ensure the correctness of the document itself.

Best Regards,
Herman
E-iceblue support team
User avatar

Herman.Yan
 
Posts: 115
Joined: Wed Mar 08, 2023 2:00 am

Mon Apr 10, 2023 11:33 am

Hi,

Thanks for your response Herman. Yes, Microsoft Word 2019 and above display a warning message - that the Custom XML cannot be saved in the current format - but it still opens the document and you can view it. Spire.Doc just throws an exception and does not open the document.

We are requesting that Spire.Doc opens the document with a warning message just like Microsoft Word.

Thank you!

ronald.vandulek
 
Posts: 3
Joined: Thu Apr 06, 2023 1:59 pm

Tue Apr 11, 2023 3:35 am

Hi,

Thanks for your feedback.
I have posted your requirement to our Dev team by using the ticket SPIREDOC-9262, they will do further investigation to check if there is any way to avoid the loading error. Once there is any update, we will keep you informed.

Best Regards,
Herman
E-iceblue support team
User avatar

Herman.Yan
 
Posts: 115
Joined: Wed Mar 08, 2023 2:00 am

Tue Apr 11, 2023 1:48 pm

Hi,

Thanks for the update. We have close to a million documents from the early 1990's to 2022 that we would like to convert to pdf using your library.

ronald.vandulek
 
Posts: 3
Joined: Thu Apr 06, 2023 1:59 pm

Wed Apr 12, 2023 9:49 am

Hello,

Thank you for your trust.
Our development team is working hard to fix this issue and will provide a solution as soon as possible. We will keep you updated on the progress in a timely manner.

Best Regards,
Herman
E-iceblue support team
User avatar

Herman.Yan
 
Posts: 115
Joined: Wed Mar 08, 2023 2:00 am

Fri Apr 28, 2023 7:23 am

Hi,

Thanks for your patience!
Glad to inform you that we just released Spire.Office_8.4.1 hotfix which fixes the issue with SPIREDOC-9262.Please download the new version from the following link to test.
Website link:https://www.e-iceblue.com/Download/download-office-for-net-now.html
Nuget link:https://www.nuget.org/packages/Spire.Office/8.4.1

Best Regards,
Herman
E-iceblue support team
User avatar

Herman.Yan
 
Posts: 115
Joined: Wed Mar 08, 2023 2:00 am

Return to Spire.Doc