Hi,
When gdpicturePDFReducer.ProcessDocument() is called, it seems that it uses as much memory as it can. If I have a 600 page PDF with not much images, it uses up to 6gb of RAM. Other PDF's which has lots of images uses even more RAM and the application just crashes. Is there a way to throttle it to avoid using too much RAM? e.g. process the PDF page by page.
It looks like it is trying to load everything into memory and then process it there.
PDF Reducer Memory Usage
Re: PDF Reducer Memory Usage
Hi there,
Thank you for your feedback here.
For managing memory within GdPicturePDF please ensure you are freeing each document after using this. This can be done via the following method:
https://www.gdpicture.com/guides/gdpict ... ument.html
You also have this method which allows you to clear the cache within your loaded document:
https://www.gdpicture.com/guides/gdpict ... urces.html
And on top of all of this, you can dispose of the GdPicturePDF object being used by using this method:
https://www.gdpicture.com/guides/gdpict ... ose().html
Please try using all 3 of the above.
For singular PDF documents containing a large number of pages, this may tricky as the full document loaded in GdPicturePDF is a requirement.
I'd recommend trying to reduce the size of the PDF using PDFReducer:
https://www.gdpicture.com/guides/gdpict ... ring).html
https://www.gdpicture.com/guides/gdpict ... neral.html
Regards,
Hugo Cudd
Technical Support
Thank you for your feedback here.
For managing memory within GdPicturePDF please ensure you are freeing each document after using this. This can be done via the following method:
https://www.gdpicture.com/guides/gdpict ... ument.html
You also have this method which allows you to clear the cache within your loaded document:
https://www.gdpicture.com/guides/gdpict ... urces.html
And on top of all of this, you can dispose of the GdPicturePDF object being used by using this method:
https://www.gdpicture.com/guides/gdpict ... ose().html
Please try using all 3 of the above.
For singular PDF documents containing a large number of pages, this may tricky as the full document loaded in GdPicturePDF is a requirement.
I'd recommend trying to reduce the size of the PDF using PDFReducer:
https://www.gdpicture.com/guides/gdpict ... ring).html
https://www.gdpicture.com/guides/gdpict ... neral.html
Regards,
Hugo Cudd
Technical Support
Re: PDF Reducer Memory Usage
Hi Hugo,
Are you able to give a guide on how we can calculate or estimate the memory that's going to be used by PDFReducer if we're going to compress a single file?
e.g.
A PDF with 10 pages will use 100MB of RAM
or
a 1MB PDF will use 30MB of RAM
This will be useful for planning and checking if a machine can run PDFReducer successfully.
Are you able to give a guide on how we can calculate or estimate the memory that's going to be used by PDFReducer if we're going to compress a single file?
e.g.
A PDF with 10 pages will use 100MB of RAM
or
a 1MB PDF will use 30MB of RAM
This will be useful for planning and checking if a machine can run PDFReducer successfully.
Who is online
Users browsing this forum: No registered users and 1 guest