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
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.
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
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