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

Free Support Forum - aspose.com

Invalid dictionary exception exists while extracting linkAnnotation

Hello team,
i am facing an issue while extracting Linkannotation.
in one PDF document 3 linkannotation found, while iterating each link, when iterating 2nd link, above exception occure.
following code i am using,

int page = pageDic.Number;
string sourcePage = page.ToString();
AnnotationCollection annots = pageDic.Annotations;
for (int index = 1; index <= annots.Count; index++)
{
Annotation annot = annots[index];
string Aname = annot.GetType().Name;
}

Annotation annot = annots[index]; in this link i am getting exception.

please give me solution to fix this issue.

image.png (3.3 KB)

Thanks
Regards
Vijaykumar L S

@vijiannabond

Thank you for contacting support.

Would you please share source PDF document so that we may try to reproduce and investigate it in our environment. Before sharing requested data, please ensure using Aspose.PDF for .NET 19.6.

Aspose test.pdf (98.5 KB)

@vijiannabond

Thank you for sharing requested data.

We have been able to reproduce the issue in our environment. A ticket with ID PDFNET-46630 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

The issues you have found earlier (filed as PDFNET-46630) have been fixed in Aspose.PDF for .NET 20.2.