We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

IndexOutOfRangeException in Aspose.Pdf.InteractiveFeatures.Forms.Field.AnnotationIndex


I got an exception( Invalid index: index should be in the range [1..n] where n equals to the pages count) when I fetch the AnnotationIndex of each field in my attached PDF file. Is it possible to help me figure why this happens? Thanks a lot!

I am using Aspose.Total v10.6 for .Net and Visual Studio Professional 2012
Here is my code snippet:
Aspose.Pdf.License pdflicense = new Aspose.Pdf.License();
pdflicense.Embedded = true;
Document pdfDocument = new Document(@"c:\Users\2011 Medical.pdf");
foreach (Aspose.Pdf.InteractiveFeatures.Forms.Field fields in pdfDocument.Form) {
System.Console.WriteLine("AnnotationIndex is {0}", fields.AnnotationIndex);

Hi Arashi,

Thanks for contacting support.

have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-39216. We
will investigate this issue in details and will keep you updated on the status
of a correction. <o:p></o:p>

We apologize for your inconvenience.

Thanks for your quick response!