We are currently getting the following stack trace when attempting to produce an image from pdf to add custom branding for a production. Is there any method that we could use to help with heap space consumption in order not to have to increase resources to complete process? The pdf file contains a blueprint or a combination of multiple blueprints.
Stack Trace:
java.lang.OutOfMemoryError: Java heap space
java.util.Arrays.copyOf(Arrays.java:3332)
java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448)
java.lang.StringBuilder.append(StringBuilder.java:136)
com.aspose.pdf.internal.l0h.ld.lI(Unknown Source)
com.aspose.pdf.OperatorCollection.toString(Unknown Source)
com.aspose.pdf.OperatorCollection.updateNormalizedData(Unknown Source)
com.aspose.pdf.facades.APdfFileEditor.resizeContents(Unknown Source)
com.aspose.pdf.facades.PdfFileEditor.resizeContents(Unknown Source)
com.aspose.pdf.facades.APdfFileEditor.resizeContentsWithNormalization(Unknown Source)
com.aspose.pdf.facades.PdfFileEditor.resizeContentsWithNormalization(Unknown Source)
com.stormed.common.utils.ImageUtils.brandPdf(ImageUtils.java:1082)
com.stormed.production.ProductionMain.doBranding(ProductionMain.java:436)
com.stormed.production.ProductionMain.(ProductionMain.java:129)
com.stormed.production.common.ProductionBuilder.run(ProductionBuilder.java:27)
com.stormed.proxy.AppRunner.run(AppRunner.java:21)
com.stormed.proxy.ProxyMain.runApp(ProxyMain.java:274)
com.stormed.proxy.ProxyMain.lambda$main$0(ProxyMain.java:122)
com.stormed.proxy.ProxyMain$$Lambda$73/1165449749.call(Unknown Source)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)