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 31, 2017 3:12 pm

Hi,
When I load a document (portfolio) that has multiple attachments (pdfs) the program is throwing an Out of Memory error.
It doesn't happen always, so it must have something to do with the size of the attached pdfs.

Please Note: If I step through the code, it may fail or it may succeed using the same file.

Any suggestions for me?
Thanks, Rob

I've attached the code
snippet.zip


The line of code that it files on is:
PdfAttachmentCollection docPDFAttached = docPDF.Attachments;

saskpower
 
Posts: 8
Joined: Mon Apr 03, 2017 2:40 pm

Thu Jun 01, 2017 6:09 am

Dear Rob,

Thanks for your inquiry.
I have tested the code with a sample file and the latest Spire.PDF Pack(Hot Fix) Version:3.9.124 many times. Yet I didn't encounter the OutOfMemoryException when running the code "PdfAttachmentCollection docPDFAttached = docPDF.Attachments;". Firstly we suggest you use the latest version if you were using old version. If the issue still happens, please provide us with following information that could help us investigate the issue.
1)the input file which has that issue on your side
2)OS information

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Jun 01, 2017 10:02 pm

Thanks for getting back to me.
After installing the hot fix it is still failing some times.
It would take weeks to get approval to send some of this out of the country.
I'll have to come up with some test data for you that isn't sensitive.
I'll be in touch when I have that ready.

Thanks so much.
Rob

saskpower
 
Posts: 8
Joined: Mon Apr 03, 2017 2:40 pm

Fri Jun 02, 2017 7:20 am

Dear Rob,

Thanks for your feedback.
I am waiting for your news.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Jun 13, 2017 9:24 am

Dear Rob,

I doesn't hear any news from you.
How is the issue now ? Could you please give us some feedback at your conveneince ?

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDF