Need to customize search functionality ReactJS

Product: Webviewer

Product Version: 8.12.0

Please give a brief summary of your issue:
I need to search in the PDF works like “word1 OR word2 OR word3
For example, see (each individual word is highlighted separately as well as all word together)
See the attached image

Please describe your issue and provide steps to reproduce it:
Our current webviewer search shows only the exact match. We are looking for the search should work as in the image.
Is there in option to make search work like this ?
Any sample or document available similar to this?

Please provide a link to a minimal sample where the issue is reproducible:

Hi p.kk,

Check out our overrideSearchExecution API here: Apryse WebViewer Namespace: UI

This will be called instead of our default search algorithm.

Best regards,

Hello Tyler
const searchFn = (searchValue: string, options: Record<string, boolean>) => {
console.log(searchValue, options);
instance.UI.searchTextFull(searchValue || searchText, options);


I used the override function as above. But I need clarification on how to filter the search result they way I want, what regex pattern I need to add. Meanwhile in options regex property seems to be a boolean type.

Hi p.kk,

Using the searchTextFull will still use the default searching,
Here are guides on implementing custom searching:

Best regards,
Tyler Gordon