This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/dws-viewer/developer-guides/open-a-document-in-web.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Open DWS-managed documents in Web SDK

To load a DWS-managed document, pass the document’s session token for authentication in the configuration object passed to NutrientViewer.load():

Requirements

DWS Viewer API requires Nutrient Web SDK versions 1.1.1 or later.

Usage

NutrientViewer.load({
container: "<container>",
session: "<session_token>",
});

The <container> placeholder in the code above should be replaced by a CSS selector or a DOM element where Nutrient Web SDK will be mounted.

The <session_token> placeholder should be replaced by the session token obtained from the DWS Viewer API dashboard(opens in a new tab), or by calling POST /viewer/sessions through its API. Session tokens are used for authenticating Nutrient Web SDK clients when connecting to DWS Viewer API.

DWS Viewer API can open DWS-managed documents or app-provided documents. DWS-managed documents are opened with session. App-provided documents are opened with session and document; refer to the open app-provided documents guide for more details.

For a cross-product overview of Web SDK, Document Engine, and DWS Viewer API document loading workflows, refer to the choose the right document opening and loading setup guide.

Integration overview

To integrate with a DWS-managed document, you need to:

  1. Upload your document — First, upload your document to DWS and obtain the document ID.
  2. Generate a session token — Use the document ID to generate a session token.
  3. Open the document in Web SDK — Use the session token to open the document in Nutrient Web SDK.

For a complete server implementation example, refer to the Node.js integration example guide.

Refer to the following additional guides: