# Javascript: PDFJSSettings.basePath Property

> Optional. Directory containing the PDF.js library and worker scripts.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Property
- **Path:** DS Server > Reference > JavaScript API - Document Viewer > Javascript: PDFJSSettings.basePath Property
- **150 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript-document-viewer/pdfjssettings/basepath-property/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript-document-viewer/pdfjssettings/basepath-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript-document-viewer/pdfjssettings/basepath-property/llms-full.txt

---

### Description

Optional. Directory containing the PDF.js library and worker scripts.

### Syntax

```javascript
<string> PDFJSSettings.basePath
```

### Examples

The following example demonstrates `PDFJSSettings.basePath` in a practical Document Viewer workflow. Specifies the legacy base path for PDF.js resources.

```javascript
const pdfjsSettings = {
    basePath: "/lib/pdfjs/"
};
console.log("base path:", pdfjsSettings.basePath);
```

---

## Nearby

- **Previous:** [PDFJSSettings Class](https://docs.textcontrol.com/ds-server/reference/javascript-document-viewer/pdfjssettings/llms-full.txt)
- **Next:** [Javascript: PDFJSSettings.librarySourcePath Property](https://docs.textcontrol.com/ds-server/reference/javascript-document-viewer/pdfjssettings/librarysourcepath-property/llms-full.txt)
