This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/web/knowledge-base/programmatically-navigate-to-page.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Navigate to PDF page programmatically | Nutrient

You can programmatically navigate to a page by mutating the viewState of the Nutrient instance.

Here’s an example:

const newState = instance.viewState.set("currentPageIndex", 1);
instance.setViewState(newState);

This would navigate the viewer to Page 2 (as the page indices start at 0).

For more information, refer to our API entry on updating the UI state.