This is a migrated thread and some comments may be shown as answers.

Hyperlink in PDF

5 Answers 107 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Freeport LNG Development
Top achievements
Rank 1
Freeport LNG Development asked on 31 Jul 2012, 03:55 PM
Hello 

We are using the PDFViewer embedded in our application, and it all seems to work fine. What we have not been able to figure out is to capture a hyperlink click before it gets "opened" and determine the url for the link and decide what do to at that point. 

Is there any way to achieve this?

Thanks

5 Answers, 1 is accepted

Sort by
0
Kammen
Telerik team
answered on 01 Aug 2012, 11:40 AM
Hello,

As there are other requests for this feature, we will implement it for the LIB (Latest Internal Build) next week. In addition, we will make sure to provide sample code showing how to handle the hyperlinks.

Kind regards,
Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Freeport LNG Development
Top achievements
Rank 1
answered on 03 Aug 2012, 01:50 PM
Hello

Thank you for your quick response. Am I correct in assuming you will inform about the internal build once it is available?

Thanks
0
Kammen
Telerik team
answered on 06 Aug 2012, 05:14 PM
Hi,

The LIB was published just now.

In this latest version, In order to handle a hyperlink when it is clicked, you should attach to AnnotationClicked event of the RadPdfViewer and use something like this:

private void viewer_AnnotationClicked(object sender, AnnotationEventArgs e)
{
    Link l = e.Annotation as Link;
    if (l == null)
    {
        return;
    }
    UriAction a = l.Action as UriAction;
    if (a == null)
    {
        return;
    }
    MessageBox.Show(a.Uri.ToString());
    e.Handled = true;
}

Note that in the future there could be annotations other than Links and Link annotations could have not only UriAction. Also the Action property itself can be null (when the Link annotation is using destination instead).

I hope this helps.

All the best,

Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Freeport LNG Development
Top achievements
Rank 1
answered on 06 Aug 2012, 05:22 PM
Thanks

The published is for Version 4 only .. Do you have one for Version 5 also?

Thanks
0
Iva Toteva
Telerik team
answered on 06 Aug 2012, 05:44 PM
There was a small delay with the display of the uploaded files. The Silverlight 5 version of the controls should be visible and available for download now.


Greetings,
Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
PDFViewer
Asked by
Freeport LNG Development
Top achievements
Rank 1
Answers by
Kammen
Telerik team
Freeport LNG Development
Top achievements
Rank 1
Iva Toteva
Telerik team
Share this question
or