Scroll document when searching

2 posts, 0 answers
  1. Christie Admin
    Christie Admin avatar
    239 posts
    Member since:
    Aug 2013

    Posted 07 Nov 2014 Link to this post


    I implemented a search functionality with the PDF Viewer control. The user have the flexibility to do a findfirst, findlast, findprior, findnext and depending on what the user did, I highlight the searchtext corresponding on which action the user did. I would like to know how to scroll to the matching text I found to have it in the visible portion of the viewer.

  2. Deyan
    Deyan avatar
    171 posts

    Posted 10 Nov 2014 Link to this post

    Hello Alain,

    Thank you for contacting us.

    You can use RadFixedDocument's CaretPosition and move it to the position of the search result. The following code snippet shows how to find some text in RadPdfViewer, scroll to the search result and select the found text.
    SearchResult searchResult = this.pdfViewer.Find(searchText);
    if (searchResult != SearchResult.NotFound)

    For more information about text positions you may follow this link to TextPosition documentation article.
    I hope this is helpful. If you have any other question or concerns please do not hesitate to contact us again.

    the Telerik team

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top