2 posts, 0 answers
  1. Paulo Goncalves
    Paulo Goncalves avatar
    26 posts
    Member since:
    Aug 2004

    Posted 23 May 2016 Link to this post

    Can I add Bookmarks at PDF page ? How ?



  2. Tanya
    Tanya avatar
    583 posts

    Posted 25 May 2016 Link to this post

    Hi Paulo,

    You could use the Annotations and Destinations functionality to achieve a similar result. The snippet below shows how you can add a link at the top-left corner of the first page which will scroll the document to the second page:

    Location location = new Location();
    location.Left = 0;
    location.Top = 0;
    location.Page = document.Pages[1];
    var link = document.Pages[0].Annotations.AddLink(location);
    link.Rect = new Rect(10, 10, 50, 50);

    Note, however, that at this point the RadFixedDocumentEditor doesn't expose convenient API that will allow you to find where a specific element (text fragment) is positioned. You could take a look at the Block article for an alternative approach to creating documents which will allow to measure each block and obtain its size for the purposes of creating the link's rectangle.

    I hope this helps.

    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Back to Top