1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 17:48:07 +02:00

Exposes all functional members via lib exports and use them in viewer.

This commit is contained in:
Yury Delendik 2016-03-28 16:44:27 -05:00
parent 1d12aed5ca
commit 1e3e14e6b2
25 changed files with 174 additions and 102 deletions

View file

@ -3,7 +3,7 @@
// Hello world example for webpack.
require('pdfjs-dist');
var pdfjsLib = require('pdfjs-dist');
var pdfPath = '../helloworld/helloworld.pdf';
@ -11,7 +11,7 @@ var pdfPath = '../helloworld/helloworld.pdf';
// however that might degrade the UI performance in web browsers.
// Loading a document.
var loadingTask = PDFJS.getDocument(pdfPath);
var loadingTask = pdfjsLib.getDocument(pdfPath);
loadingTask.promise.then(function (pdfDocument) {
// Request a first page
return pdfDocument.getPage(1).then(function (pdfPage) {