From c88eb0a44a2ec46397a423452d21aa9094343006 Mon Sep 17 00:00:00 2001 From: TT TY Date: Tue, 3 Mar 2015 11:38:06 +0000 Subject: [PATCH] Updated Setup PDF.js in a website (markdown) --- Setup-PDF.js-in-a-website.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Setup-PDF.js-in-a-website.md b/Setup-PDF.js-in-a-website.md index af8513c..71e831b 100644 --- a/Setup-PDF.js-in-a-website.md +++ b/Setup-PDF.js-in-a-website.md @@ -11,10 +11,11 @@ This way works by loading this file `pdfjs-dist/build/pdf.js` after you install If you use webpack or browserify there is an easy way to require the files: - var pdf = require('pdfjs-dist/build/pdf'); - var pdfWorker = require('pdfjs-dist/build/pdf.worker'); - // Still figuring out how to use with worker. - +```javascript +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