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 Feb 04, 2022 2:45 pm
Hi,
In our application we regularly have to load large files (> 500 MB) and I'm investigating memory efficient options in Spire.PDF.
Currently we use the LoadFromFile function.
Could you please recommend how to avoid that we need to hold the document wholly in memory?
Is there a method for loading single pages rather than the full document for example?
Or an option to specify if the file will be loaded into memory or not?
Thank you in advance!
Cheers
-

aellawaai
-
- Posts: 5
- Joined: Fri Feb 04, 2022 2:25 pm
Mon Feb 07, 2022 2:11 am
Hello,
Thanks for your inquiry!
Kindly note that we need the entire data of the PDF document to analyze it when loading the PDF through Spire.PDF. Sorry that it is impossible to load a single page, and we do not have an option to specify if the file will be loaded into memory when using our Spire.PDF. Hope you can understand.
But after you finished all operation about the PDF, you can use PdfDocument.Dispose() to release the memory that cost for loading.
Sincerely,
Marcia
E-iceblue support team
-


Marcia.Zhou
-
- Posts: 858
- Joined: Wed Nov 04, 2020 2:29 am
Tue Feb 08, 2022 5:13 pm
Hello Marcia,
Thank you for clarifying the operation of the LoadFromFile function. We'l look into other ways to deal with the memory load then, so you can close this issue.
Cheers!
-

aellawaai
-
- Posts: 5
- Joined: Fri Feb 04, 2022 2:25 pm
Wed Feb 09, 2022 1:08 am
Hello,
Thanks for your feedback!
If you encounter any issues related to our product in the future, just feel free to contact us.
Have a nice day!
Sincerely,
Marcia
E-iceblue support team
-


Marcia.Zhou
-
- Posts: 858
- Joined: Wed Nov 04, 2020 2:29 am