Skip to content

Commit

Permalink
#162 added documentation how to set custom worker path
Browse files Browse the repository at this point in the history
  • Loading branch information
VadimDez committed Dec 29, 2017
1 parent b395a7c commit c801159
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c801159

Please sign in to comment.