Fix the helloworld example by importing the network.js
file (PR 8617 follow-up)
Fixes https://stackoverflow.com/q/45393309/5317012
This commit is contained in:
parent
2702021a84
commit
1f6de75585
@ -3,11 +3,12 @@
|
|||||||
// In production, the bundled pdf.js shall be used instead of SystemJS.
|
// In production, the bundled pdf.js shall be used instead of SystemJS.
|
||||||
Promise.all([System.import('pdfjs/display/api'),
|
Promise.all([System.import('pdfjs/display/api'),
|
||||||
System.import('pdfjs/display/global'),
|
System.import('pdfjs/display/global'),
|
||||||
|
System.import('pdfjs/display/network'),
|
||||||
System.resolve('pdfjs/worker_loader')])
|
System.resolve('pdfjs/worker_loader')])
|
||||||
.then(function (modules) {
|
.then(function (modules) {
|
||||||
var api = modules[0], global = modules[1];
|
var api = modules[0], global = modules[1];
|
||||||
// In production, change this to point to the built `pdf.worker.js` file.
|
// In production, change this to point to the built `pdf.worker.js` file.
|
||||||
global.PDFJS.workerSrc = modules[2];
|
global.PDFJS.workerSrc = modules[3];
|
||||||
|
|
||||||
// Fetch the PDF document from the URL using promises.
|
// Fetch the PDF document from the URL using promises.
|
||||||
api.getDocument('helloworld.pdf').then(function (pdf) {
|
api.getDocument('helloworld.pdf').then(function (pdf) {
|
||||||
|
Loading…
Reference in New Issue
Block a user