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.

Wed Jun 25, 2025 12:36 pm

Hello,

I'm trying to merge several PDFs, and one of them is giving me an error, but I don't know why.
var testDoc = PdfDocument.MergeFiles(new string[] { @"D:\TestLNM_1.pdf", @"D:\TestLNM_Error_2.pdf" });

This happens occasionally, but I don't know why or how to fix it.
We're using Spire version 8.3.2, and we can't update because it's an old application, and when we update, many things stop compiling.
Do you have any way to fix the problem with this version? Why don't some files work?

Best regards, and thank you very much,

LauraNM
 
Posts: 92
Joined: Tue Feb 19, 2019 1:23 pm

Thu Jun 26, 2025 2:35 am

Hello,

Thanks for your inquiry.
I used the latest Spire.PDF and Spire.Office 8.3.2 for testing, but I did not reproduce the problem you mentioned. To help us investigate further, could you please provide us with a simplified project that can reproduce the issue? In addition, Spire.Office 8.3.2 was released 2 years ago, and the latest Spire.PDF contains more fixes, which may include the fix for your problem. Therefore, we still recommend that you upgrade and retest.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 757
Joined: Mon Dec 27, 2021 2:23 am

Thu Jun 26, 2025 11:08 am

Thanks you very much.
My problem is that the document I'm getting the error on is very large. It's 12 megabytes, and it won't let me upload it. And if I split it to send only the pages that are giving me the error, ILovePDF modifies the document and then the error can't be reproduced.
Is there any way to send a document that large?
It doesn't matter if I try to merge the document or just copy some pages, it always fails. The code is simple: join two documents. This is something that causes it to fail in certain documents.
If you could help me, I would greatly appreciate it.
Regards,

LauraNM
 
Posts: 92
Joined: Tue Feb 19, 2019 1:23 pm

Thu Jun 26, 2025 1:10 pm

Hi,
I saw that by compressing the PDF with Spire I could send it, but I still got the error when merging both files.
If you could help me, I would greatly appreciate it, as this happens to me with 5% of the files I merge.

var testDoc = PdfDocument.MergeFiles(new string[] { @"D:\TestLNM_1.pdf", @"D:\compressed_TestLNM_Error_2_1750943075023" });

I attach the files to be joined

TestLNM_1.rar


Best regards, and thank you very much!

LauraNM
 
Posts: 92
Joined: Tue Feb 19, 2019 1:23 pm

Fri Jun 27, 2025 6:31 am

Hello,

Thanks for your reply.
I encountered the error "Value cannot be null" when merging the latest files you provided. Is this the error you encountered? I have logged this issue to our tracking system with the ticket SPIREPDF-7589. Our dev team will further investigate and fix it, and I will inform you once there is any progress. Sorry for the inconvenience.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 757
Joined: Mon Dec 27, 2021 2:23 am

Fri Jun 27, 2025 8:08 am

Hello,
Yes, that's the error I'm getting.
I've also tried copying the document page by page, and I can even see which page is missing, but I don't know how to fix it.

Thank you so much for your help!

LauraNM
 
Posts: 92
Joined: Tue Feb 19, 2019 1:23 pm

Fri Jun 27, 2025 8:19 am

Hello,

Thanks for your reply.
For your problem, we can only wait for further fixes from the developers. I will inform you as soon as there is any good news.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 757
Joined: Mon Dec 27, 2021 2:23 am

Fri Jul 11, 2025 6:07 am

Hello,

Thank you for your patience.
We have just released the latest Spire.PDF Pack (Hotfix) Version: 11.7.2, which fixes the issue SPIREPDF-7589. Welcome to update and test.
Website link:https://www.e-iceblue.com/Download/download-pdf-for-net-now.html
Nuget:https://www.nuget.org/packages/Spire.PDF/11.7.2

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 757
Joined: Mon Dec 27, 2021 2:23 am

Fri Jul 11, 2025 10:42 am

Hello,
First, thank you for your help!
In our case, we have an enterprise license and we use Spire.Office version 8.3.2.
I don't know how to update the Spire.PDF version, but the truth is, I'm afraid to update the Spire.Office version because we've had licensing issues in some cases, and we're also having compilation issues since some of the functions we use don't compile when we update to new versions.

How can I integrate the Spire.PDF 11.7.2 solution into my project that uses Spire.Office version 8.3.2? Is my current license still valid?

Best regards and thank you very much,

LauraNM
 
Posts: 92
Joined: Tue Feb 19, 2019 1:23 pm

Mon Jul 14, 2025 6:00 am

Hello,

Sorry for the late response due to the weekend.

Our new version includes optimizations for a small number of APIs (such as search and replace interfaces). Could you please specify what compilation issues you've encountered after upgrading?

Please note that Spire.Office 8.3.2 was released in March 2023, which is over two years ago. Directly replacing Spire.PDF 11.7.2 may cause compatibility issues. May we ask if your project uses features from any other Spire components, such as Spire.Doc? If not, we recommend that you uninstall all DLLs of the old Spire.Office version, and then download and install the latest Spire.PDF 11.7.2 directly from our official website or NuGet. If yes, please first uninstall all old Spire.Office DLLs, then upgrade to the latest version of Spire.Office(10.6.0), and finally replace the Spire.PDF.dll within it with the latest version 11.7.2.

Additionally, we couldn't locate a purchase record matching your license information. Could you please provide your purchase order or license email? You may send the information to my email: [email protected].
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 341
Joined: Mon Apr 14, 2025 3:33 am

Mon Jul 14, 2025 12:33 pm

Hello,
First, thank you for your response.
We use XLS, DOC, QR code reading and writing, and PDFs, of course.
However, it's an application that was developed several years ago, which we use a lot, but currently still uses .Net Core 2.2, so I couldn't update directly to the latest version of Spire.Office since it's not compatible.
I'll email you the licensing information.

Best regards and thank you very much,

LauraNM
 
Posts: 92
Joined: Tue Feb 19, 2019 1:23 pm

Tue Jul 15, 2025 7:31 am

Thank you for your feedback.

According to your license purchase record dated December 14, 2023, your free update entitlement covers versions released prior to December 14, 2024. This means your current license is not valid for the Spire.PDF V11.7.2 which was released on July 9, 2025.

Regarding your inquiry about .NET Core 2.2 compatibility, the new version of Spire.Office does support this platform. The upgrade process involves: first removing the existing Spire.Office references from your project, then downloading the latest Spire.Office package from our official website(https://www.e-iceblue.com/Download/download-office-for-net-now.html), importing dlls from the netcoreapp2.0 folder into your project and installing the following dependencies to complete the update.

Microsoft.Win32.Registry >= 4.5.0
System.Drawing.Common >= 4.5.0
System.Security.Permissions >= 4.5.0
System.Text.Encoding.CodePages >= 4.5.0
System.Security.Cryptography.Pkcs >= 4.5.0
System.Security.Cryptography.Xml >=4.5.0
HarfBuzzSharp >=8.3.0.1

Please note that all bug fixes and new features are only included in our most recent releases. Your current license does not grant access to Spire.PDF 11.7.2. To use this version, you will need to renew your license.

We would be happy to provide you with a one-month free temporary license so you can upgrade to the latest Spire.Office and Spire.PDF packages to ensure optimal performance and functionality.
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 341
Joined: Mon Apr 14, 2025 3:33 am

Return to Spire.PDF

cron