Updated Setup PDF.js in a website (markdown)

TT TY 2015-03-03 11:37:02 +00:00
parent 5716bb05da
commit c788491515

@ -3,8 +3,16 @@ You can choose to use a pre-built version of PDF.js, or build PDF.js from source
## Pre-built PDF.js ## Pre-built PDF.js
### With npm ### With npm
This way works by loading this file `pdfjs-dist/build/pdf.js` after you install pdf.js:
npm install pdfjs-dist npm install pdfjs-dist
#### With webpack/browserify
var pdf = require('pdfjs-dist/build/pdf');
var pdfWorker = require('pdfjs-dist/build/pdf.worker');
// Still figuring out how to use with worker.
### From examples ### From examples
When the source code of PDF.js changes, the [online demo](http://mozilla.github.io/pdf.js/web/viewer.html) is automatically updated. The source of all demo files can easily be accessed at https://github.com/mozilla/pdf.js/tree/gh-pages/. When the source code of PDF.js changes, the [online demo](http://mozilla.github.io/pdf.js/web/viewer.html) is automatically updated. The source of all demo files can easily be accessed at https://github.com/mozilla/pdf.js/tree/gh-pages/.
These files can also be uploaded to your server to use PDF.js to display PDF files from your website These files can also be uploaded to your server to use PDF.js to display PDF files from your website