---
title: "Open specific page in PDF using JavaScript | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/web/features/open-parameters/"
md_url: "https://www.nutrient.io/guides/web/features/open-parameters.md"
last_updated: "2026-05-15T19:10:05.088Z"
description: "Nutrient Web SDK supports a PDF feature called PDF open parameters, which lets you control specific view options via parts of the URL."
---

# Opening specific pages in PDFs using JavaScript

Nutrient Web SDK supports a PDF feature called [PDF open parameters](https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDFOpenParameters.pdf), which allows you to control specific view options via parts of the URL.

To pass open parameters to the PDF viewer, include them in the URL of the page that embeds the PDF. Open parameters are passed in the hash of the URL. Take care not to pass open parameters to the `load` function’s `pdf` argument, as this won’t work.

At the moment, Nutrient only supports the open parameter `page`. For example, when you’d like the viewer to show page 12 of a PDF directly after loading, you could add the open parameter to your URL like this:

```

https://your-host.com/your-pdf-page.html#page=12

```

## Custom view state

When you pass an `initialViewState` to Nutrient’s `load` method, this view state will override your open parameters. To avoid this, create your custom view state using [`viewStateFromOpenParameters`](https://www.nutrient.io/api/web/functions/NutrientViewer.viewStateFromOpenParameters.html). [Try it in the Playground](https://www.nutrient.io/demo/sandbox?p=ewogICJ2IjogMSwKICAic2V0dGluZ3MiOiB7CiAgICAiZmlsZU5hbWUiOiAiYmFzaWMucGRmIgogIH0sCiAgImpzIjogIk51dHJpZW50Vmlld2VyLmxvYWQoe1xuICAuLi5iYXNlT3B0aW9ucyxcbiAgaW5pdGlhbFZpZXdTdGF0ZTogTnV0cmllbnRWaWV3ZXIudmlld1N0YXRlRnJvbU9wZW5QYXJhbWV0ZXJzKFxuICAgIG5ldyBOdXRyaWVudFZpZXdlci5WaWV3U3RhdGUoeyBzaG93VG9vbGJhcjogZmFsc2UgfSlcbiAgKVxufSk7IiwKICAiY3NzIjogIiIKfQo%3D).

```js

NutrientViewer.load({
  container: "#pspdfkit",

  document: "/path/to/document.pdf",
  initialViewState: NutrientViewer.viewStateFromOpenParameters(
    new NutrientViewer.ViewState({ showToolbar: false })
  )
}).then((instance) => {
    console.log("Document loaded with open parameters");
  }).catch((error) => {
    console.error("Failed to load document:", error.message);
  });

```
---

## Related pages

- [Open PDFs from Base64 in the browser using JavaScript](/guides/web/open-a-document/from-base64-data.md)
- [Open PDFs from an ArrayBuffer using JavaScript](/guides/web/open-a-document/from-arraybuffer.md)
- [Open and display PDFs from a Blob using JavaScript](/guides/web/open-a-document/from-blob.md)
- [Open documents from Document Engine](/guides/web/open-a-document/from-document-engine.md)
- [Open image files from a URL using JavaScript](/guides/web/open-a-document/image-from-remote-url.md)
- [Open local PDF files using JavaScript](/guides/web/open-a-document/from-local-storage.md)
- [Open PDFs using DWS Viewer API](/guides/web/open-a-document/from-dws-viewer-api.md)
- [Open Base64 image files using JavaScript](/guides/web/open-a-document/image-from-base64-data.md)
- [Open and display PDF files from a remote URL using JavaScript](/guides/web/open-a-document/from-remote-url.md)
- [Open local image files using JavaScript](/guides/web/open-a-document/image-from-local-storage.md)
- [Open image files from a Blob using JavaScript](/guides/web/open-a-document/image-from-blob.md)
- [Open and display PDFs in the browser using JavaScript](/guides/web/open-a-document.md)
- [Open Base64 MS Office files using JavaScript](/guides/web/open-a-document/office-from-base64-data.md)
- [Open image files from an array buffer using JavaScript](/guides/web/open-a-document/image-from-arraybuffer.md)
- [Open MS Office files from an ArrayBuffer using JavaScript](/guides/web/open-a-document/office-from-arraybuffer.md)
- [Open MS Office files from a Blob using JavaScript](/guides/web/open-a-document/office-from-blob.md)
- [Open local MS Office files using JavaScript](/guides/web/open-a-document/office-from-local-storage.md)
- [Open MS Office files from a URL using JavaScript](/guides/web/open-a-document/office-from-remote-url.md)
- [Temporary storage for PDF downloads](/guides/web/open-a-document/temp-storage.md)

