Added missing network stream for svgviewer example
This commit is contained in:
parent
0052dc2b0d
commit
ead83b7a72
@ -39,11 +39,13 @@ function renderDocument(pdf, svgLib) {
|
|||||||
Promise.all([System.import('pdfjs/display/api'),
|
Promise.all([System.import('pdfjs/display/api'),
|
||||||
System.import('pdfjs/display/svg'),
|
System.import('pdfjs/display/svg'),
|
||||||
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], svg = modules[1], global = modules[2];
|
var api = modules[0], svg = modules[1], global = modules[2], network = modules[3];
|
||||||
|
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[4];
|
||||||
|
|
||||||
// In production, change this to point to where the cMaps are placed.
|
// In production, change this to point to where the cMaps are placed.
|
||||||
global.PDFJS.cMapUrl = '../../external/bcmaps/';
|
global.PDFJS.cMapUrl = '../../external/bcmaps/';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user