I'm trying to find out dead bookmarks and links on pdf, for that i'm storing all the named destinations in a dictionary and trying to store target page, so that i can validate its valid page or not? I'm trying something like this..
For Each named As KeyValuePair(Of String, PdfObject) In reader.GetNamedDestinationFromStrings()
If Not namedDestinations.ContainsKey(named.Key) Then
namedDestinations.Add(named.Key, named.Value)
Dim thisDest As PdfArray = DirectCast(named.Value, PdfArray)
Dim a As PdfIndirectReference = DirectCast(thisDest(0), PdfIndirectReference)
Dim thisPage As PdfDictionary = PdfReader.GetPdfObject(a)
End If
Next
this code i have copied from other thread, i need to catch up the page number. Or else do we have any other method to validate dead links and bookmarks..