Hello
There’s an issue Aspose PDF version 16.12 when adding LinkAnnotations to an existing PDF created in Acrobat distiller. The link is taking the page view to the wrong page (the page after the actual page it’s supposed to go to) when viewing the PDF created in Aspose in Acrobat Pro (or IE’s Acrobat viewer plugin). This doesn’t occur in Chrome’s PDF viewer.
Please see the attached code in the sample console Visual Studio project, and sample pdf (graph.pdf) and output pdf generated by the code (output-link.pdf)
I have a workaround but it requires setting the link annotation’s destination explicitly.
Example code below:
var link = new Aspose.Pdf.Annotations.LinkAnnotation(textFragment.Page, s.Rectangle);
link.Action = new GoToAction(new Aspose.Pdf.Annotations.XYZExplicitDestination(doc.Pages[2], 1, 2, 0));
link.Destination = new XYZExplicitDestination(doc.Pages[2], 1, 2, 0);
Thanks,