Hi, we are evaluating the Doconut Sample files with .NET Framework 4.7 and Doconut libraries version 24.7.0.
We are encountering Out of Memory errors after 4-5 times of uploading some PDF files of 90 megabytes. We are using the Webforms minimal template with the Ribbon interface copied from the “Full” folder.
What can we do in order to avoid getting those OOM errors?
@ArielRon,
Thank you for reaching out and for evaluating Doconut.
To optimize PDF rendering and reduce memory usage, we recommend adjusting these properties within the PdfConfig
class.
CompressImages
: Enable this property to compress images within the PDF.
CompressQuality
: Adjust the quality of image compression to balance between image quality and memory usage.
ResizeImages
: This property allows you to resize images to lower resolutions.
ResizeResolution
: Set this property to control the target resolution for resized images.
Additionally, consider reducing the ImageResolution
property. The default value is 200, but you can experiment with lower values to find a balance between rendering speed and image quality.
I also wanted to inform you that Doconut version 24.8.0 has been released, which includes several performance improvements and optimizations.
I hope these suggestions help to resolve the OOM issues. Please feel free to reach out if you need further assistance.
Hi Gabriel, thanks for your quick reply.
We tried applying those properties and other properties but still get Out of Memory messages after loading PDF files over 90Mbytes.
Do you know if there is any difference between the trial dlls and the paid ones?
We are currently using this config for PDF files:
DefaultRender = true,
ExtractHyperlinks = true,
HyperlinksPageCount = 0,
AllowCopy = true,
CompressImages = true
ResizeImages = true,
ImageResolution = 50
@ArielRon,
I tested Doconut with a 102 MB PDF file; in Visual Studio, the memory usage was 1.4 GB.
Could you send me the demo you are using and the file in a ZIP file? So I can replicate the scenario in our testing machines.
Is the error occurring on a different machine? What is the amount of RAM installed on your testing machine?