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

Document Search solution

3 Answers 93 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Christie Admin
Top achievements
Rank 1
Christie Admin asked on 05 Nov 2014, 09:00 PM
Hi,

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?

Thank's
Alain

3 Answers, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 10 Nov 2014, 09:54 AM
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.

Regards,
Petya
Telerik
 

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.

 
0
Matthias
Top achievements
Rank 1
answered on 27 Feb 2020, 03:40 PM

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
https://docs.telerik.com/devtools/wpf/controls/radrichtextbox/how-to/features-custom-ui-layers

  this.editor.UILayersBuilder = new CustomLayersBuilder();

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

Matthias

 

 

0
Tanya
Telerik team
answered on 02 Mar 2020, 01:51 PM

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.

Regards,
Tanya
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.
Tags
PDFViewer
Asked by
Christie Admin
Top achievements
Rank 1
Answers by
Petya
Telerik team
Matthias
Top achievements
Rank 1
Tanya
Telerik team
Share this question
or