Browse Source

Merge pull request #7036 from Snuffleupagus/svg-example-set-cmap-url

[SVG] Specify the `PDFJS.cMapUrl`/`PDFJS.cMapPacked` parameters in the svgviewer example
Tim van der Meij 9 years ago
parent
commit
915eac3d20
  1. 4
      examples/svgviewer/viewer.js

4
examples/svgviewer/viewer.js

@ -53,6 +53,10 @@ require(['pdfjs/display/api', 'pdfjs/display/svg'], function (api, svg) { @@ -53,6 +53,10 @@ require(['pdfjs/display/api', 'pdfjs/display/svg'], function (api, svg) {
// In production, change this to point to the built `pdf.worker.js` file.
PDFJS.workerSrc = '../../src/worker_loader.js';
// In production, change this to point to where the cMaps are placed.
PDFJS.cMapUrl = '../../external/bcmaps/';
PDFJS.cMapPacked = true;
// Fetch the PDF document from the URL using promises.
api.getDocument(url).then(renderDocument);
});

Loading…
Cancel
Save