f0719ed565
If, as PR 10368 suggests, more parameters should be added to `getViewport` I think that it would be a mistake to not change the signature *first* to avoid needlessly unwieldy call-sites. To not break any existing code and third-party use-cases, this is obviously implemented with a deprecation warning *and* with a working fallback[1] for the old method signature. --- [1] This is limited to `GENERIC` builds, which should be sufficient. |
||
---|---|---|
.. | ||
.eslintrc | ||
.gitignore | ||
index.html | ||
main.js | ||
package.json | ||
README.md | ||
webpack.config.js |
Overview
Example to demonstrate PDF.js library usage with Webpack.
Getting started
Install the example dependencies and build the project:
$ gulp dist-install
$ cd examples/webpack
$ npm install
$ ./node_modules/webpack/bin/webpack.js
You can observe the build results by running gulp server
and navigating to
http://localhost:8888/examples/webpack/index.html.
Refer to the main.js
and webpack.config.js
files for the source code.
Note that PDF.js packaging requires packaging of the main application and
the worker code, and the workerSrc
path shall be set to the latter file.