diff --git a/README.md b/README.md index 8e80bf34e..cee0bae38 100644 --- a/README.md +++ b/README.md @@ -299,6 +299,17 @@ onFileSelected() { ``` +### Set custom path to the worker + +By default the `worker` is loaded from `cdnjs.cloudflare.com`. + +In your code update `path` to the worker to be for example `/pdf.worker.js` +```js +PDFJS.workerSrc = '/pdf.worker.js'; +``` +*This should be set before `pdf-viewer` component is rendered.* + + ## Contribute Clone the project