Hi there
There seems to be an issue with LinkAnnotation behaving differently when viewing the generated PDF in IE (or Acrobat viewer) vs. Chrome. This is the code I’m using to generate a link annotation to navigate the user to a different page within the same PDF document.
var link = new LinkAnnotation(pdfDoc.Pages[1], pageTokenRectangle);
link.Destination = new FitBExplicitDestination(pdfDoc.Pages[3]);
In Chrome, if the user zooms out, eg. to 75%, and clicks on the link annotation, the page is displayed in the same zoom. In IE or Acrobat, it looks like the destination page is displayed in fit-to-page.
Please advise.
Hi there,
Thanks for your inquiry. Apparently, you are facing the issue due to different default PDF viewers of the browsers. Please set
Adobe Reader as default PDF viewer of your browsers, it will resolve the issue.
Please feel free to contact us for any further assistance.
Best Regards,
Hi there
I’m not sure if your suggestion solves my issue. The expected behavior is that the zoom is maintained when the user navigates to the new page via the link annotation.This issue is happening in Acrobat but not in the Chrome viewer. My users are using Acrobat viewer and IE. I cannot force them to change their browsers / viewers.
Hi there,
Thanks for your feedback. If you want to inherit zoom then you need to pass 0 zoom value as following. It will help you to accomplish the task. However if the issue persist then please share your sample input/output documents along with your sample code, so we will look into it and will guide you accordingly.
XYZExplicitDestination dest = new
XYZExplicitDestination(document.Pages[3],
document.Pages[3].Rect.Width, document.Pages[3].Rect.Height, 0);
link.Destination = dest;
Please feel free to contact us for any further assistance.
Best Regards,