From 585cd933b7256c5f9ea08a77e052897551c215f8 Mon Sep 17 00:00:00 2001 From: "FAREAST\\wenxh" Date: Tue, 5 Sep 2017 20:47:14 +0800 Subject: [PATCH] Fix the helloworld example by setting the PDFNetworkStream class (PR 8712 follow-up) --- examples/helloworld/hello.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/helloworld/hello.js b/examples/helloworld/hello.js index df26035f3..fe413c77a 100644 --- a/examples/helloworld/hello.js +++ b/examples/helloworld/hello.js @@ -6,7 +6,9 @@ Promise.all([System.import('pdfjs/display/api'), System.import('pdfjs/display/network'), System.resolve('pdfjs/worker_loader')]) .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. global.PDFJS.workerSrc = modules[3];