DS Server

PDFJSSettings Class

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

PDFJSSettings

Examples

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

PropertyDescription
basePathOptional. Directory containing the PDF.js library and worker scripts.
librarySourcePathOptional. URL of the PDF.js library script.
workerSourcePathOptional. URL of the PDF.js worker script.