For search feature, I want to load the specific page to load and the search word also to be highlighted on that page through api.
How shall we proceed to achieve this task
Hello, I’m Ron, an automated tech support bot
While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:
Guides:- Searching in PDF.js Express - Get started
- APIs for customizing UI
- Events for PDF.js Express - Document Load Error Handling
Hi there,
I am going to have to ask you to please read through our guides before submitting tickets, as all of this information is easily accessible in our guides. Also please note that our auto-responder sent you multiple links that answered your question.
That being said,
To programmatically search, view the guides here. These APIs will automatically highlight results.
const searchValue = 'pdf'
instance.searchText(searchValue, {})
To jump to a specific page on a document, use the setCurrentPage API.
instance.docViewer.setCurrentPage(1)
Thanks,
Logan