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 May 13, 2026 1:36 am

Hello, Support Team,

I am working with a PDF file that is approximately 3.5 GB in size.
When I try to open this PDF, I receive an error and cannot open it.
This PDF does not contain any layers, passwords, or attachments.
It consists of approximately 3,600 scanned pages.

1-1) The code I am using to open the file is as follows:
PdfDocument _doc = new PdfDocument();
_doc.LoadFromFile(_filename);

1-2) The error message is as follows (shown in the original text):
System.ArgumentOutOfRangeException: '負の値ではない数値が必要です。
パラメーター名:value'
この例外は、最初にこの呼び出し履歴
System.IO.FileStream.Position.set(long)
spr跌.恫(long)
spr豟.惽()
spr豟.spr豟(System.IO.Stream)
spr揶.spr揶(System.IO.Stream, string, bool)
spr揶.spr揶(string)
Spire.Pdf.PdfDocument.LoadFromFile(string)
CPDFSpire.GetPageCount(string, bool) 場所: CPDFSpire.cs
でスローされました

2) The product and version I am using are as follows:
Spire.Pdf 10.1.0.1040

3) I am using both Windows 10 and Windows 11, both 64-bit versions. I am also using them in Japan.

4) The application type is a Windows Forms application; the code is written in C# using the .NET Framework 4.8.

5) I tried the following:
A.) Re-printing using Adobe’s “Microsoft Print to PDF” and opening the resulting file
B.) Splitting a single 3,600-page file into two 1,800-page files and opening them
As a result, A.) resulted in an error, but B.) opened successfully.

Could the file size be the reason it won’t open? Please advise.

Thank you for reading.
Sincerely,
h.yamamoto

h.yamamoto
 
Posts: 5
Joined: Wed May 13, 2026 12:54 am

Wed May 13, 2026 3:25 am

Hi h.yamamoto,

Thank you for providing the detailed information and test results.

Based on the error message and your successful test with the split files, it appears that the issue is triggered by the massive file size (3.5 GB). However, I also conducted a test on my end using a large document of 3.57 GB but was unable to reproduce the same error. Therefore, I suspect the issue might be related to the specific structure or data within your particular document.

Since version 10.1.0 you are currently using is quite outdated, I recommend updating to the latest version (12.5.1) to see if the issue persists. If the problem remains, please upload your 3.5 GB file to a server and provide us with the download link so that I can perform a detailed analysis and investigation.

Looking forward to your feedback!

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Thu May 14, 2026 12:18 am

Hello
E-iceblue Support Team, Nina

>>Since version 10.1.0 you are currently using is quite outdated, I recommend updating to the latest version (12.5.1) to see if the issue persists. If the problem remains, please upload your 3.5 GB file to a server and provide us with the download link so that I can perform a detailed analysis and investigation.

Since you mentioned the version was outdated, I updated it and tested it again. However, I still couldn’t open the file and received the same error.
Regarding the file upload, I’m afraid I cannot upload it because it contains confidential information. I apologize for the inconvenience.

I mentioned that I am using the 64-bit version of Windows, and I am also using the 64-bit version of the application.
・When you tested it, were you using a 32-bit version of the application?
・Is there a 64-bit version of Spire.PDF available?

Thank you for reading.
Sincerely,
h.yamamoto

h.yamamoto
 
Posts: 5
Joined: Wed May 13, 2026 12:54 am

Thu May 14, 2026 3:56 am

Hi,

Please rest assured regarding the architecture. Our components fully support 64-bit environments (while also being compatible with 32-bit) and run seamlessly across Windows, Linux, macOS, and other platforms.

In fact, when handling large documents like yours, we highly recommend running in a 64-bit environment. Compared to 32-bit applications, 64-bit programs have a much higher memory limit, which effectively prevents crashes or exceptions caused by insufficient memory.

Since you cannot share the original file due to confidentiality, could you please provide us with a sanitized sample that can reproduce the issue for our analysis?

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Thu May 14, 2026 9:09 am

Hello,
E-iceblue Support Team, Nina

>>Please rest assured regarding the architecture. Our components fully support 64-bit environments (while also being compatible with 32-bit) and run seamlessly across Windows, Linux, macOS, and other platforms.In fact, when handling large documents like yours, we highly recommend running in a 64-bit environment.

Understood. I’m using the Form App in 64-bit mode, and it works fine for files that aren’t very large.

>>Since you cannot share the original file due to confidentiality, could you please provide us with a sanitized sample that can reproduce the issue for our analysis?

I have prepared some sample data. It consists of 853 pages, all images (excerpts from Wikipedia), totaling 3.5 GB. This is a recreation of the original data, which was created almost entirely from scanned images.
1. I was able to open it in Adobe Reader.
2. I was unable to open it directly in Spire.Pdf (same error as last time).
3. I was able to open it when I extracted a few pages from the file.

I’d like you to review the file I created, but since it’s quite large, could you please send me a link to upload it?

Thank you for reading.
Sincerely,
h.yamamoto

h.yamamoto
 
Posts: 5
Joined: Wed May 13, 2026 12:54 am

Thu May 14, 2026 9:32 am

Hello,
E-iceblue Support Team, Nina

Here is the Google Drive share link.
I've uploaded the file here.
https://drive.google.com/file/d/1dDE-rSN5JBjA0G78GzuF-7qIznhHWPGy/view?usp=sharing

Please let me know if you were able to download it.

Thank you for reading.
Sincerely,
h.yamamoto

h.yamamoto
 
Posts: 5
Joined: Wed May 13, 2026 12:54 am

Thu May 14, 2026 9:58 am

Hi,

Thanks for the file.
I couldn't replicate the issue on my end. Please share your test code and let me know your project framework ( e.g., WinForm, .NET Framework 4.8 ) so we can investigate further.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Fri May 15, 2026 12:13 am

Hello,
E-iceblue Support Team, Nina

>>Please share your test code and let me know your project framework ( e.g., WinForm, .NET Framework 4.8 ) so we can investigate further.

I am sending you a partial excerpt of the test code.

The project is a Windows Forms application.
The framework is .NET Framework 4.8.
The language used is C#.
(I sometimes use VB.NET as well. I would appreciate it if you could convert the test code to VB.NET for investigation.)
Also, when checking the DLL bit depth using 7-Zip, Spire.PDF is displayed as x86 (32-bit).
CMD command: “C:\Program Files\7-Zip\7z.exe” l “C:\work\Spire.Pdf.dll” | findstr CPU
Result: CPU = x86

Thank you for your further investigation.
Sincerely,
h.yamamoto

h.yamamoto
 
Posts: 5
Joined: Wed May 13, 2026 12:54 am

Fri May 15, 2026 3:38 am

Hi,

Thanks for your feedback.
I tested your code but still can't reproduce your issue at my end. Here I attached my test screenshot as well as test demo for your better reference.
[img]pic.png[/img]

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.PDF