pdf.js/examples/browserify/README.md

26 lines
862 B
Markdown
Raw Normal View History

2016-04-05 01:32:01 +09:00
## Overview
Example to demonstrate PDF.js library usage with Browserify.
2016-04-05 01:32:01 +09:00
## Getting started
Build project and install the example dependencies:
$ gulp dist
$ cd examples/browserify
$ npm install
2016-04-05 01:32:01 +09:00
To build Browserify bundles, run `gulp build`. If you are running
2016-04-05 01:32:01 +09:00
a web server, you can observe the build results at
http://localhost:8888/examples/browserify/index.html
See main.js, worker.js and gulpfile.js files. Please notice that PDF.js
packaging requires packaging of the main application and PDF.js worker code,
and the `workerSrc` path shall be set to the latter file.
2016-04-05 01:32:01 +09:00
Alternatives to the gulp commands (without compression) are:
$ mkdir -p ../../build/browserify
$ node_modules/.bin/browserify main.js -o ../../build/browserify/bundle.js
$ node_modules/.bin/browserify worker.js -o ../../build/browserify/pdf.worker.bundle.js