# DocumentLoadSettings Class

> Configures document-provider behavior while loading a document. Use the `pdfjs` property to configure the optional PDF.js provider through PDFJSSettings. If no PDF.js configuration is provided, the viewer uses the server-side provider backed by TX Text Control endpoints.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Class
- **Path:** DS Server > Reference > JavaScript API - Document Viewer > DocumentLoadSettings Class
- **399 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript-document-viewer/documentloadsettings/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript-document-viewer/documentloadsettings/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript-document-viewer/documentloadsettings/llms-full.txt

---

### Description

Configures document-provider behavior while loading a document. Use the `pdfjs` property to configure the optional PDF.js provider through [PDFJSSettings](https://docs.textcontrol.com/ds-server/reference/javascript-document-viewer/pdfjssettings/llms-full.txt). If no PDF.js configuration is provided, the viewer uses the server-side provider backed by TX Text Control endpoints.

### Syntax

```javascript
DocumentLoadSettings
```

### Examples

The following example demonstrates `DocumentLoadSettings` in a practical Document Viewer workflow. This object encapsulates settings for loading documents.

```javascript
const documentLoadSettings = {
    loadEmbeddedComments: true,
    pdfs: {
        workerSourcePath: "/lib/pdfjs/pdf.worker.min.js",
        librarySourcePath: "/lib/pdfjs/pdf.min.js"
    }
};
console.log("Document load settings:", documentLoadSettings);
```

---

## In This Section

- [Javascript: DocumentLoadSettings.loadEmbeddedComments Property](https://docs.textcontrol.com/ds-server/reference/javascript-document-viewer/documentloadsettings/loadembeddedcomments-property/llms-full.txt): Controls whether embedded document comments are loaded as viewer annotations. When disabled, comments remain rendered in the document but are not imported as editable annotations.
- [Javascript: DocumentLoadSettings.pdfjs Property](https://docs.textcontrol.com/ds-server/reference/javascript-document-viewer/documentloadsettings/pdfjs-property/llms-full.txt): Optional. Selects and configures the PDF.js provider.

---

## Nearby

- **Previous:** [Javascript: DocumentLinkClickedEventArgs.target Property](https://docs.textcontrol.com/ds-server/reference/javascript-document-viewer/documentlinkclickedeventargs/target-property/llms-full.txt)
- **Next:** [Javascript: DocumentLoadSettings.loadEmbeddedComments Property](https://docs.textcontrol.com/ds-server/reference/javascript-document-viewer/documentloadsettings/loadembeddedcomments-property/llms-full.txt)
