PDFJSSettings Class
Description
PDF.js source locations used when loading a document with the PDF.js provider. Either `basePath` or both explicit source paths must be supplied.
Syntax
PDFJSSettingsExamples
The following example demonstrates PDFJSSettings in a practical Document Viewer workflow. Configures the PDF.js library paths used by the Document Viewer.
const pdfjsSettings = {
workerSourcePath: "/lib/pdfjs/pdf.worker.min.js",
librarySourcePath: "/lib/pdfjs/pdf.min.js"
};
console.log("PDF.js settings:", pdfjsSettings);Members
Properties
| Property | Description |
|---|---|
| basePath | Optional. Directory containing the PDF.js library and worker scripts. |
| librarySourcePath | Optional. URL of the PDF.js library script. |
| workerSourcePath | Optional. URL of the PDF.js worker script. |