We are using Groupdocs conversion 22.8.1, to convert documents to PDF,
however when converting a high resolution image, the conversion fails with the exception -
OutOfMemoryError Java heap space
below is the code snippet used to convert -
Convertor converter = new Converter(ImagePath.toString());
PdfConvertOptions options = new PdfConvertOptions();
converter.convert(pdfPath.toString(), options); //<- exception here
I do know that incresing JVM heap memory with option -Xmx, will resolve this.
we currently assign 500mb to this microservice.
but could you please let us know what is the minimum required memory for groupdocs conversion.
because right now this is one conversion, what if two conversion were to happen by two different user of our microservice, then even 1gb will not suffice?
and is there any option to control the memory usage of conversion.
sample image-
to reproduce, set JVM heap memory to 500 mb using - -Xmx500m,
and try to convert the sample image to pdf