mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Adds gulp dist-install command; using pdfjs-dist package in examples.
This commit is contained in:
parent
9342054502
commit
a18caa730d
24 changed files with 70 additions and 53 deletions
|
@ -1,12 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
// In production, the bundled pdf.js shall be used instead of SystemJS.
|
||||
Promise.all([SystemJS.import('pdfjs/display/api'),
|
||||
SystemJS.import('pdfjs/display/global')])
|
||||
Promise.all([System.import('pdfjs/display/api'),
|
||||
System.import('pdfjs/display/global'),
|
||||
System.resolve('pdfjs/worker_loader')])
|
||||
.then(function (modules) {
|
||||
var api = modules[0], global = modules[1];
|
||||
// In production, change this to point to the built `pdf.worker.js` file.
|
||||
global.PDFJS.workerSrc = '../../src/worker_loader.js';
|
||||
global.PDFJS.workerSrc = modules[2];
|
||||
|
||||
// Fetch the PDF document from the URL using promises.
|
||||
api.getDocument('helloworld.pdf').then(function (pdf) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue