Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Thu May 05, 2022 3:45 pm

Hi we recently updated our spire.PDF cert/license and are getting this error

Code errors on Their function called "SaveToStream"

this is the error;


System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at spr⥯.ᜃ(String A_0)
at spr⧊.ᜆ(String A_0)
at spr⭏.᜖(ShapeObject A_0)
at spr⭏.ᜁ(ShapeObject A_0, Boolean A_1)
at spr⭏.ᜀ(ShapeObject A_0, String A_1, Boolean A_2)
at spr⭏.ᜱ(ShapeObject A_0)
at spr⭏.ᜰ(ShapeObject A_0)
at spr⭏.ᜁ()
at spr⭎.ᜀ(ShapeObject A_0, spr⫉ A_1)
at spr⫉.ᜆ(ShapeObject A_0)
at spr⫉.ᜊ(ShapeObject A_0)
at Spire.Doc.Fields.ShapeObject.AcceptStart(spr⍅ visitor)
at Spire.Doc.DocumentObject.ᜄ(spr⍅ A_0)
at Spire.Doc.Fields.ShapeObject.Accept(spr⍅ visitor)
at Spire.Doc.DocumentObject.ᜅ(spr⍅ A_0)
at Spire.Doc.DocumentObject.ᜄ(spr⍅ A_0)
at Spire.Doc.Documents.Paragraph.Accept(spr⍅ visitor)
at Spire.Doc.DocumentObject.ᜅ(spr⍅ A_0)
at Spire.Doc.DocumentObject.ᜄ(spr⍅ A_0)
at Spire.Doc.Body.Accept(spr⍅ visitor)
at spr⫉.ᜀ(HeaderFooter A_0)
at spr⬖.ᜀ(Section A_0, HeaderFooterType A_1, spr⬍ A_2)
at spr⬖.ᜀ(Section A_0, spr⬍ A_1)
at spr⬖.ᜁ(Section A_0, spr⬍ A_1)
at spr⫈.ᜁ()
at spr⫈.ᜄ()
at spr⫉.ᜆ()
at spr⫑.ᜃ()
at spr⫑.ᜀ(spr⥒ A_0)
at spr⫑.ᜀ(Document A_0, Stream A_1)
at Spire.Doc.Document.ᜊ(Stream A_0)
at Spire.Doc.Document.SaveToFile(Stream stream, FileFormat fileFormat)
at Spire.Doc.Document.SaveToStream(Stream stream, FileFormat fileFormat)

djacobs111
 
Posts: 12
Joined: Mon Aug 01, 2016 6:13 pm

Fri May 06, 2022 3:09 am

Hello,

Thank you for your inquiry.
I tested your license with the latest version of Spire.Office (Spire.Office Platinum(Hotfix) Version: 7.4.10), but did not reproduce the issue you mentioned. Please note that the range of Key values for your license is "BHKQHtABAHn...0MTzSpYqMcn". Please test it again with the code below.
Code: Select all
Spire.License.LicenseProvider.SetLicenseKey("BHKQHtABAHn...0MTzSpYqMcn");

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1647
Joined: Wed Apr 07, 2021 2:50 am

Fri May 06, 2022 5:27 pm

Hi,
The issue occurs only on the attached file, currently. We can open and save any other word documents.
Here is the part of our code;
Code: Select all
using (Spire.Doc.Document document = new Spire.Doc.Document())
{
       document.LoadFromStream(s_stream, Spire.Doc.FileFormat.Auto);
       //...
       document.SaveToStream(o_stream, Spire.Doc.FileFormat.Docx);
}


Our Spire Office Version is 7.3.2

Please see the attached file.

djacobs111
 
Posts: 12
Joined: Mon Aug 01, 2016 6:13 pm

Sat May 07, 2022 2:00 am

Hello,

Thank you for your sharing.
I tested your word file and reproduced your issue. I have logged the issue into our bug tracking system with the ticket number SPIREDOC-7792. Our development team will investigate and fix it. Once it is resolved, I will inform you in time. Sorry for the inconvenience caused.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1647
Joined: Wed Apr 07, 2021 2:50 am

Tue May 17, 2022 2:16 pm

Hi Support,

Just following up on this thread. Are there any updates / ETA on this issue?

djacobs111
 
Posts: 12
Joined: Mon Aug 01, 2016 6:13 pm

Wed May 18, 2022 1:06 am

Hello,

Thanks for your follow-up.
The issue SPIREDOC-7792 has been resolved and it is going to test phase now. If the test goes well, we will provide a hotfix for you as soon as possible. Please give us more time, thanks for your understanding.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1647
Joined: Wed Apr 07, 2021 2:50 am

Fri May 27, 2022 10:03 am

Hello,

Thanks for your patience!
Glad to inform you that we just released Spire.Office Platinum(Hotfix) Version:7.5.4 which fixes the issue of SPIREDOC-7792.
Please download the new version from the following links 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/7.5.4

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1647
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.PDF