We have a PDF file (sample.pdf (132.2 KB)
) that contains a form filled out by comments. When we call this method resizeContentsWithNormalization of PdfFileEditor to resize the PDF file, following exception occurred:
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
** at com.aspose.pdf.Color.lf(Unknown Source)**
** at com.aspose.pdf.Annotation.ld(Unknown Source)**
** at com.aspose.pdf.FreeTextAnnotation.lI(Unknown Source)**
** at com.aspose.pdf.FreeTextAnnotation.lf(Unknown Source)**
** at com.aspose.pdf.Annotation.lI(Unknown Source)**
** at com.aspose.pdf.Annotation.updateAppearances(Unknown Source)**
** at com.aspose.pdf.Annotation.changeAfterResize(Unknown Source)**
** at com.aspose.pdf.facades.APdfFileEditor.resizeContents(Unknown Source)**
** at com.aspose.pdf.facades.PdfFileEditor.resizeContents(Unknown Source)**
** at com.aspose.pdf.facades.APdfFileEditor.resizeContentsWithNormalization(Unknown Source)**
** at com.aspose.pdf.facades.PdfFileEditor.resizeContentsWithNormalization(Unknown Source)**
Although there are exceptions, we still can save the resized PDF file: sample-resized.pdf (126.9 KB)
But the comments seem not being resized too. They look like still in the original positions:
sample.png (147.4 KB)
Could you please help us to identify why the exception occurred? and is it possible to resize the comments together?