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.

Fri Apr 15, 2022 5:50 pm

Starting with version 8.3.9 I am encountering the same error referenced in this forum post (post43072.html) which is "An item with the same key has already been added". This error occurs when creating a new pdf that combines multiple pdfs, when some of those child pdfs had another pdf appended to them during their creation. I am able to append the first child pdf to the overall combined pdf, but upon calling PdfDocument.AppendPage(newChildPdf) for the second child pdf the error occurs. This is prior to saving the overall combined pdf document. I'm still working on a simple code sample which replicates this issue, but given that it's occurred and been resolved before I'm hopeful that the issue will be easily identified. Note that downgrading to version 8.2.2 resolves the error, so it appears to be something new and perhaps related to parallel processing of multiple PdfDocument instances.

sentrichr
 
Posts: 13
Joined: Tue Jul 24, 2018 1:16 pm

Mon Apr 18, 2022 8:14 am

Hi,

Thank you for your inquiry and sorry for the late reply as weekend.
I did an initial test to merge PDF documents using Spire.PDF Pack(Hot Fix) Version:8.3.9 in multithreading, but did not reproduce your problem. Please provide the following information for further investigation. You can attach your file here or send it to us via email (support@e-iceblue.com). Thank you in advance.
1) Your PDF document and your code which can reproduce your issue
2) Your test Environment, such as Windows10, 64bit
3) The type of application, such as Console App, .NET Framework 4.8

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Tue May 03, 2022 5:58 pm

Thank you for your response, sorry for my delay. My work has taken me onto other things, however I have started creating a small application which demonstrates the issue. I will post another update once that is complete and ready to share.

sentrichr
 
Posts: 13
Joined: Tue Jul 24, 2018 1:16 pm

Wed May 04, 2022 9:30 am

Hello,

Thanks for your feedback.
Looking forward to your sharing.

Sincerely,
Annika
E-iceblue support team
User avatar

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

Return to Spire.PDF