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
Please add some memory, for example -Xmx1024M.
Note that Bitmap of such size requires a lot of memory because it has high resolution and it is decompressing during the conversion.
The issues you have found earlier (filed as CONVERSIONJAVA-1853) have been fixed in this update. This message was posted using Bugs notification tool by Atir_Tahir
After upgrading to this version, we are getting exception -
class com.groupdocs.conversion.internal.c.a.s.exceptions.G: License parsing error â> java.lang.IllegalArgumentException: Property http://javax.xml.XMLConstants/property/accessExternalDTD is not recognized.
Hi atir, no need, it was issue with âxecersâ and âxml-apisâ dependency in maven, after excluding it from my pom, it worked, might have been the way it tries to parse xml. Anyway itâs not recommended nowdays, also havenât occurred the oom issue for same scanrio so, I guess this release really fixed that, thank a lot to you and the team. Appriciated.