Extract Links from PDF Problem

When extracting LinkAnnotation from an existing PDF document i get "Object reference not set to an instance of an object" .

I am attempting to follow the example here: http://www.aspose.com/documentation/.net-components/aspose.pdf-for-.net/extract-links-from-the-pdf-file.html

Here is my code (I have attached the pdf file that i am using)

Dim pdfDocument As New Aspose.Pdf.Document("M:\temp\TestProgrammingFiles\InputC.pdf")<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Dim page As Page = pdfDocument.Pages(1)<o:p></o:p>

Dim selector As New AnnotationSelector(New LinkAnnotation(page,
Aspose.Pdf.Rectangle.Trivial))<o:p></o:p>

MsgBox(selector.Selected.Count.ToString) 'This Retruns 0<o:p></o:p>

page.Accept(selector) 'Throws
an error - “Object reference not set to an instance of an object.”
<o:p></o:p>

Dim list As IList = selector.Selected<o:p></o:p>

Dim annotation As Annotation = CType(list(0),
Annotation)<o:p></o:p>

I am using VB.Net, Aspose.pdf 6.1, Visual Studio 2010.

Thanks

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample code and template file.

We have found your mentioned issue after an initial test. Your issue has been registered in out issue tracking system with issue id: PDFNEWNET-30101. You will be updated via this forum thread once we have any update on your issue.

Sorry for the inconvenience caused.

Any update to this? I’m facing the same problem.

Hi Ryan,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please download and try the latest version of Aspose.Pdf for .NET v6.4.0. It works fine as per the above mentioned issue. Please try it and let us know if you still face any issue with the latest version.

Thank You & Best Regards,

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