In the following case, we have a document with hyperlinks that scroll to a specific location in the document. Clicking on the links does not scroll to the specified location.
Hi Dan,
Thank you for reporting this behavior. Here is a possible workaround that can be used in the meantime.
public Form2()
{
InitializeComponent();
this.radPdfViewer1.PdfViewerElement.AnnotationClicked += RadPdfViewer1_AnnotationClicked;
}
private void RadPdfViewer1_AnnotationClicked(object sender, Telerik.Windows.Documents.Fixed.Model.Annotations.EventArgs.AnnotationEventArgs e)
{
Telerik.Windows.Documents.Fixed.Model.Annotations.Link link = e.Annotation as Telerik.Windows.Documents.Fixed.Model.Annotations.Link;
if (link == null)
{
return;
}
Telerik.Windows.Documents.Fixed.Model.Actions.Action linkAction = link.Actions?.FirstOrDefault();
if (linkAction is GoToAction goToAction)
{
ExecuteGoToAction(this.radPdfViewer1,goToAction);
}
}
private static void ExecuteGoToAction(RadPdfViewer presenter, GoToAction action)
{
var viewer = presenter;
if (action.Destination != null)
{
presenter.PdfViewerElement.GoToDestination(action.Destination);
}
else if (action.NamedDestination != null)
{
if (action.NamedDestination.Destination != null)
{
presenter.PdfViewerElement.GoToDestination(action.NamedDestination.Destination);
}
else
{
ExecuteGoToAction(presenter, action.NamedDestination.GoToAction);
}
}
}Regards,
Dinko | Tech Support Engineer
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.