Hyperlink in PDF

6 posts, 0 answers
  1. Freeport LNG Development
    Freeport LNG Development avatar
    8 posts
    Member since:
    Apr 2010

    Posted 31 Jul 2012 Link to this post

    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
  2. Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 01 Aug 2012 Link to this post

    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.

  3. DevCraft banner
  4. Freeport LNG Development
    Freeport LNG Development avatar
    8 posts
    Member since:
    Apr 2010

    Posted 03 Aug 2012 Link to this post

    Hello

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

    Thanks
  5. Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 06 Aug 2012 Link to this post

    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.

  6. Freeport LNG Development
    Freeport LNG Development avatar
    8 posts
    Member since:
    Apr 2010

    Posted 06 Aug 2012 Link to this post

    Thanks

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

    Thanks
  7. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 06 Aug 2012 Link to this post

    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.

Back to Top
DevCraft banner