# Load specific page while searching

**URL:** <https://pdfjs.community/t/load-specific-page-while-searching/949>\
**Category:** Technical Support\
**Created:** [August 12, 2021, 7:10am UTC](https://pdfjs.community/t/load-specific-page-while-searching/949 "2021-08-12T07:10:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![utkarsh.shrivastav](https://avatars.discourse-cdn.com/v4/letter/u/ecb155/32.png) [@utkarsh.shrivastav](https://pdfjs.community/u/utkarsh.shrivastav)\
**Post date:** [August 12, 2021, 7:10am UTC](https://pdfjs.community/t/load-specific-page-while-searching/949/1 "2021-08-12T07:10:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/ffbcd25c7d423db8d5acd5db201c272f4db306dd.png) [@system](https://pdfjs.community/u/system)\
**Post date:** [August 12, 2021, 7:10am UTC](https://pdfjs.community/t/load-specific-page-while-searching/949/2 "2021-08-12T07:10:57Z")

</div>

**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](https://pdfjs.express/documentation/search/overview#get-started)
- [APIs for customizing UI](https://pdfjs.express/documentation/ui-customization/api)
- [Events for PDF.js Express - Document Load Error Handling](https://pdfjs.express/documentation/learn-more/events#document-load-error-handling)

APIs:
- [CoreControls.Search](https://pdfjs.express/api/CoreControls.Search.html#__anchor)
- [CoreControls.Document - loadAsync(partRetriever, callback, options)](https://pdfjs.express/api/CoreControls.Document.html#loadAsync__anchor)
- [Header - new Header()](https://pdfjs.express/api/Header.html#Header__anchor)

Forums:
- [Programmatically highlight text upon searching](https://pdfjs.community/t/programmatically-highlight-text-upon-searching/71/1)
- [Executing TextSearchInit multiple times](https://pdfjs.community/t/executing-textsearchinit-multiple-times/712/1)
- [Annotate PDF on load in reactJS](https://pdfjs.community/t/annotate-pdf-on-load-in-reactjs/944/4)

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [August 12, 2021, 4:45pm UTC](https://pdfjs.community/t/load-specific-page-while-searching/949/3 "2021-08-12T16:45:40Z")

</div>

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](https://pdfjs.express/documentation/search/basic-search). These APIs will automatically highlight results.

```javascript
const searchValue = 'pdf'
instance.searchText(searchValue, {})

```

To jump to a specific page on a document, use the [setCurrentPage](https://pdfjs.express/api/CoreControls.DocumentViewer.html#setCurrentPage__anchor) API.

```javascript
instance.docViewer.setCurrentPage(1)

```

Thanks,  
Logan
