Hi,
I notice in some PDF with LinkAnnotations pointing another page inside the document, the PageNumber property in LinkAnnotation.Destination attribute is always 0. Destination is implemented by XYZExplicitDestination.
Note the Action attribute is null.
How can I get the page pointed by the link annotation?
Here is a sample PDF to illustrate.
Uploading: PDFReference.pdf…
@tfipsrd
Would you please also share the sample code that you have been trying? We will test the scenario in our environment and address it accordingly.
Here is a sample code to illustrate.
foreach (var annotationIn in pdfPage.Annotations)
{
if (annotationIn is LinkAnnotation link)
{
if (link.Destination != null && link.Destination is XYZExplicitDestination xyzDestination)
{
var pageNumber = xyzDestination.PageNumber; // always 0. Note link.Destination.Page is null
}
}
}
@tfipsrd
We are unable to download the file you attached. Looks like it was not uploaded correctly. Can you please attach that again?
@tfipsrd
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFNET-58993
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.