# Is there a way to tell the viewer to "scrollTo" a specific page or location?

**URL:** <https://pdfjs.community/t/is-there-a-way-to-tell-the-viewer-to-scrollto-a-specific-page-or-location/2030>\
**Category:** General Discussion\
**Created:** [September 14, 2022, 3:46pm UTC](https://pdfjs.community/t/is-there-a-way-to-tell-the-viewer-to-scrollto-a-specific-page-or-location/2030 "2022-09-14T15:46:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elliot](https://avatars.discourse-cdn.com/v4/letter/e/858c86/32.png) [@elliot](https://pdfjs.community/u/elliot)\
**Post date:** [September 14, 2022, 3:46pm UTC](https://pdfjs.community/t/is-there-a-way-to-tell-the-viewer-to-scrollto-a-specific-page-or-location/2030/1 "2022-09-14T15:46:25Z")

</div>

I’m reading through the documentation, but I haven’t found anything that seems like it would do this…

the use case is, we’ve searched the PDF prior to rendering it, and when we do render it… we want to start on a specific search result (i.e. the 5th occurrence of a word that shows up 20 times)…

I know the viewer support jumping to a search result… but that looks like it always starts with the first match.

Thanks!

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [September 14, 2022, 6:05pm UTC](https://pdfjs.community/t/is-there-a-way-to-tell-the-viewer-to-scrollto-a-specific-page-or-location/2030/2 "2022-09-14T18:05:24Z")

</div>

Hello elliot,

We have:

- documentViewer.setCurrentPage
- documentViewer.zoomTo(zoom [, x] [, y]) which you can pass in X, Y values to zoom to (you can keep the zoom the same value)

Does this work for you?

Best regards,  
Tyler Gordon  
Web Development Support Engineer  
PDFTron

Share how you are using PDF.js Express in your organization you could win a **$500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free**. Learn more [here](https://utm.guru/ueQNw)
