---
title: "Open document from Document Engine | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/web/open-a-document/from-document-engine/"
md_url: "https://www.nutrient.io/guides/web/open-a-document/from-document-engine.md"
last_updated: "2026-06-10T14:38:59.034Z"
description: "Learn how to open documents from Document Engine seamlessly. Follow our detailed guide for easy integration and efficient document management."
---

# Open documents from Document Engine

To load a document from the Document Engine backend when using Nutrient Web SDK in server-backed [operational mode](https://www.nutrient.io/guides/web/about/operational-modes.md), pass the document’s ID, the JSON Web Token (JWT) for authentication, and information as to whether or not Nutrient Instant should be enabled in the [configuration](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html) object passed to [`NutrientViewer.load()`](https://www.nutrient.io/api/web/NutrientViewer.html#.load):

```js

// Document Engine mode: requires documentId, authPayload (JWT), and instant options
NutrientViewer.load({
	container: "#pspdfkit",

	documentId: "<document_id>",
	authPayload: { jwt: "<jwt>" },
	instant: true
}).then((instance) => {
		console.log("Document loaded from Document Engine");
	}).catch((error) => {
		console.error("Failed to load document:", error);
	});

```

The `<document_id>` placeholder in the code above should be replaced by the identifier of an existing document on Document Engine. See the [Document Engine documentation](https://www.nutrient.io/guides/document-engine.md) for information on how to upload documents.

The `<jwt>` placeholder should be replaced with a valid and signed JWT. See the [Generate a JWT](https://www.nutrient.io/guides/document-engine/viewer/client-authentication/generate-a-jwt.md) guide for details.

The `instant` option configures whether or not [Nutrient Instant](https://www.nutrient.io/guides/web/instant-synchronization.md) should be enabled. Nutrient Instant is a real-time collaboration platform that enables your users to annotate documents simultaneously using Nutrient across iOS, Android, Flutter, React Native, and their browser.

## Accessing a password-protected document

To load password-protected PDFs, you can provide the `password` option in the [configuration](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#password).

Alternatively, clients can access password-protected PDFs by using a JWT that includes the `password` claim, or by supplying the password when [opening or loading a document](https://www.nutrient.io/guides/web/features/password-protected-pdfs.md).

If the password is neither included in the JWT nor set via the configuration, the user will be asked to enter the password via a password prompt.

## Loading options

Open files in any [supported file format](https://www.nutrient.io/guides/web/about/file-type-support.md).

`NutrientViewer.load()` accepts the following configuration options:

- [`annotationTooltipCallback`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#.annotationTooltipCallback)

- [`customRenderers`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#.customRenderers)

- [`electronicSignatures`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#.electronicSignatures)

- [`annotationPresets`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#annotationPresets)

- [`authPayload`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#authPayload) (Server only)

- [`autoSaveMode`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#autoSaveMode)

- [`baseUrl`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#baseUrl)

- [`container`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#container)

- [`disableForms`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#disableForms)

- [`disableHighQualityPrinting`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#disableHighQualityPrinting)

- [`disableOpenParameters`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#disableOpenParameters)

- [`disableTextSelection`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#disableTextSelection)

- [`documentId`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#documentId) (Server only)

- [`editableAnnotationTypes`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#editableAnnotationTypes)

- [`enableServiceWorkerSupport`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#enableServiceWorkerSupport)

- [`formFieldsNotSavingSignatures`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#formFieldsNotSavingSignatures)

- [`headless`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#headless)

- [`initialViewState`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#initialViewState)

- [`instant`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#instant) (Server only)

- [`isEditableAnnotation`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#isEditableAnnotation)

- [`isEditableComment`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#isEditableComment)

- [`locale`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#locale)

- [`maxDefaultZoomLevel`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#maxDefaultZoomLevel)

- [`maxPasswordRetries`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#maxPasswordRetries)

- [`minDefaultZoomLevel`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#minDefaultZoomLevel)

- [`password`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#password)

- [`onPasswordRequired`](https://www.nutrient.io/api/web/interfaces/Configuration.html#onpasswordrequired)

- [`populateInkSignatures`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#populateInkSignatures)

- [`populateStoredSignatures`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#populateStoredSignatures)

- [`preventTextCopy`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#preventTextCopy)

- [`printMode`](https://www.nutrient.io/api/web/modules/NutrientViewer.html#.PrintMode)

- [`renderPageCallback`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#renderPageCallback)

- [`serverUrl`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#serverUrl)

- [`signal`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#signal)

- [`stampAnnotationTemplates`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#stampAnnotationTemplates)

- [`styleSheets`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#styleSheets)

- [`theme`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#theme)

- [`toolbarItems`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#toolbarItems)

- [`toolbarPlacement`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#toolbarPlacement)

**Example**

```js

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

  documentId,
  authPayload: { jwt: "<jwt>" },
  instant: true,
  toolbarItems: NutrientViewer.defaultToolbarItems.filter(item => item.type!== "print"),
  initialViewState: new NutrientViewer.ViewState({
    sidebarMode: NutrientViewer.SidebarMode.THUMBNAILS
  })
}).then((instance) => {
    console.log("Document loaded successfully");
  }).catch((error) => {
    console.error("Failed to load document:", error);
  });

```
---

## Related pages

- [Open PDFs using DWS Viewer API](/guides/web/open-a-document/from-dws-viewer-api.md)
- [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 image files from a Blob using JavaScript](/guides/web/open-a-document/image-from-blob.md)
- [Open local PDF files using JavaScript](/guides/web/open-a-document/from-local-storage.md)
- [Open image files from an array buffer using JavaScript](/guides/web/open-a-document/image-from-arraybuffer.md)
- [Open and display PDF files from a remote URL using JavaScript](/guides/web/open-a-document/from-remote-url.md)
- [Open Base64 image files using JavaScript](/guides/web/open-a-document/image-from-base64-data.md)
- [Open local image files using JavaScript](/guides/web/open-a-document/image-from-local-storage.md)
- [Open MS Office files from an ArrayBuffer using JavaScript](/guides/web/open-a-document/office-from-arraybuffer.md)
- [Open image files from a URL using JavaScript](/guides/web/open-a-document/image-from-remote-url.md)
- [Temporary storage for PDF downloads](/guides/web/open-a-document/temp-storage.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 MS Office files from a Blob using JavaScript](/guides/web/open-a-document/office-from-blob.md)
- [Opening specific pages in PDFs using JavaScript](/guides/web/features/open-parameters.md)
- [Open MS Office files from a URL using JavaScript](/guides/web/open-a-document/office-from-remote-url.md)
- [Open local MS Office files using JavaScript](/guides/web/open-a-document/office-from-local-storage.md)

