diff --git a/Setup-PDF.js-in-a-website.md b/Setup-PDF.js-in-a-website.md index abfe7b3..2591c14 100644 --- a/Setup-PDF.js-in-a-website.md +++ b/Setup-PDF.js-in-a-website.md @@ -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 ### With npm +This way works by loading this file `pdfjs-dist/build/pdf.js` after you install pdf.js: + 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 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