Document Search solution

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

    Posted 05 Nov 2014 Link to this post


    I would like to know if it's possible by code when using the FindAll methods to highlight all search results and navigate through them in the document?

  2. Petya
    Petya avatar
    989 posts

    Posted 10 Nov 2014 Link to this post

    Hello Alain,

    RadPdfViewer does not support multiple selection, so if you want to highlight more than one range of text you need to create a custom layer that will draw the highlight. Attached is a simple example showing how you could go about this task.

    I hope this helps.


    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.

  3. Matthias
    Matthias avatar
    1 posts
    Member since:
    Feb 2020

    Posted 27 Feb in reply to Petya Link to this post

    Hi Petya
    We are also implementing a search in the pdf viewer. Thank you for your sample code.

    We do a custom layer builder and register it with ExtensibilityManager.RegisterLayersBuilder. This looks
    like a process wide registration (singleton). That means, that different
    instances of the RadPdfViewer share the same custom layer builder.
    This singleton cannot be removed easily. It cannot be replaced, as the time
    of the usage is not known. It must remain in memory, even if the instance of RadPdfViewer
    is not used anymore.

    We would like to have the possibility to configure an instance of the
    RadPdfViewer with layers. I have found an example for RadRichTextBox

      this.editor.UILayersBuilder = new CustomLayersBuilder();

    Would that be possible? Or is there already a way without ExtensibilityManager.RegisterLayersBuilder?




  4. Tanya
    Tanya avatar
    899 posts

    Posted 02 Mar Link to this post

    Hello Matthias,

    The API of the two components is pretty different and while you can indeed use different layers for RadRichTextBox, the manager used in RadPdfViewer is a static class and won't allow that. I am afraid that there is no option I could suggest you to use different layers for the different instances of RadPdfViewer.

    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top