We are using pdfContentEditor.getStamps(pageNum) to read the stamps from that page.
We are getting OOM for some pdf files. Heap dump shows it occupied 3.8 GB heap memory.
I can not share the pdf file which caused this OOM.
any suggestions to over come OOM for this ?
Stack trace
at java.lang.OutOfMemoryError.()V (OutOfMemoryError.java:48)
at com.aspose.pdf.internal.ms.System.IO.l1j.lI(I)V (Unknown Source)
at com.aspose.pdf.internal.ms.System.IO.l1j.lj(I)V (Unknown Source)
at com.aspose.pdf.internal.ms.System.IO.l1j.write([BII)V (Unknown Source)
at com.aspose.pdf.internal.l2h.lu.lI(Lcom/aspose/pdf/internal/l5y/l0t;Lcom/aspose/pdf/internal/l5y/l0h;ZZ)Lcom/aspose/pdf/internal/ms/System/Collections/Generic/l0t; (Unknown Source)
at com.aspose.pdf.internal.l2h.lu.lI(Lcom/aspose/pdf/internal/l5y/l0t;Lcom/aspose/pdf/internal/l5y/l0h;)Lcom/aspose/pdf/internal/ms/System/Collections/Generic/l0t; (Unknown Source)
at com.aspose.pdf.OperatorCollection.lb()V (Unknown Source)
at com.aspose.pdf.OperatorCollection.ld()Lcom/aspose/pdf/internal/ms/System/Collections/Generic/l0t; (Unknown Source)
at com.aspose.pdf.OperatorCollection.size()I (Unknown Source)
at com.aspose.pdf.OperatorCollection$lI.hasNext()Z (Unknown Source)
at com.aspose.pdf.facades.PdfContentEditor.lI(Lcom/aspose/pdf/Matrix;Lcom/aspose/pdf/OperatorCollection;Lcom/aspose/pdf/Resources;Lcom/aspose/pdf/internal/ms/System/Collections/Generic/l0t;Ljava/lang/Object;)V (Unknown Source)
at com.aspose.pdf.facades.PdfContentEditor.lI(Lcom/aspose/pdf/OperatorCollection;Lcom/aspose/pdf/Resources;Lcom/aspose/pdf/internal/ms/System/Collections/Generic/l0t;Ljava/lang/Object;)V (Unknown Source)
at com.aspose.pdf.facades.PdfContentEditor.lI(I)[Lcom/aspose/pdf/facades/PdfContentEditor$lI; (Unknown Source)
at com.aspose.pdf.facades.PdfContentEditor.getStamps(I)[Lcom/aspose/pdf/facades/StampInfo; (Unknown Source)