Skip to content

Commit

Permalink
Add documentation about setOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Nov 17, 2017
1 parent 6bde889 commit 9ed8776
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,23 @@ Displays an outline (table of contents). Must be placed inside `<Document />` or
|onParseError|Function called in case of an error while parsing the outline.|`(error) => alert('Error while parsing the outline! ' + error.message)`|
|onParseSuccess|Function called when the outline is successfully parsed.|`({ outline }) => alert('There are ' + outline.length + ' top level items in the table of contents.')`|

### setOptions

Allows to set custom options of PDF.js renderer. Currently supported properties are:

- cMapUrl
- cMapPacked
- disableWorker
- workerSrc

Example usage:

```js
setOptions({
workerSrc: 'my-path-to-worker.js'
});
```

## License

The MIT License.
Expand Down

0 comments on commit 9ed8776

Please sign in to comment.