Browse Source

Fix the helloworld example by setting the PDFNetworkStream class (PR 8712 follow-up)

FAREAST\wenxh 8 years ago committed by Wenson Hu
parent
commit
585cd933b7
  1. 4
      examples/helloworld/hello.js

4
examples/helloworld/hello.js

@ -6,7 +6,9 @@ Promise.all([System.import('pdfjs/display/api'),
System.import('pdfjs/display/network'), 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], network = modules[2];
api.setPDFNetworkStreamClass(network.PDFNetworkStream);
// 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[3]; global.PDFJS.workerSrc = modules[3];

Loading…
Cancel
Save