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

Free Support Forum - aspose.com

Issue with Link Annotation in Acrobat


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);


Hi Abby,

Thanks for your inquriy. Please set position of Action to top right of the page as following, sample output is attached for reference. Hopefully it will resolve the issue.

var link = new

link.Action = new GoToAction(new Aspose.Pdf.Annotations.XYZExplicitDestination(doc.Pages[2], doc.Pages[2].PageInfo.Width, doc.Pages[2].PageInfo.Height, 0));

//link.Destination = new XYZExplicitDestination(doc.Pages[2], doc.Pages[2].PageInfo.Width, doc.Pages[2].PageInfo.Height, 0);

s.TextState.ForegroundColor = Aspose.Pdf.Color.Blue;


Please feel free to contact us for any further assistance.

Best Regards,