Programmatically highlight text upon searching

Hi Chitrang,

Thanks for contacting us regarding PDFJS Express!

Fortunately, the information that quads contain is good enough to programmatically create a highlight annotation.

We have a text-position sample that shows the code you might be interested in. The sample is available under the samples/advanced/text-position folder in the download package from https://pdfjs.express/documentation/get-started/manually.

The function in the sample that you want to take a look at is highlightText.

Let me know how this works and if you have any other questions!

Best Regards,
Zhijie