Browse Source

Merge pull request #8235 from Snuffleupagus/issue-7901

Disable the `NativeImageDecoder` in the `node/pdf2svg.js` example (issue 7901)
Yury Delendik 8 years ago committed by GitHub
parent
commit
f9c07fa695
  1. 5
      examples/node/pdf2svg.js

5
examples/node/pdf2svg.js

@ -44,7 +44,10 @@ function getFileNameFromPath(path) {
// Will be using promises to load document, pages and misc data instead of // Will be using promises to load document, pages and misc data instead of
// callback. // callback.
pdfjsLib.getDocument(data).then(function (doc) { pdfjsLib.getDocument({
data: data,
disableNativeImageDecoder: true,
}).then(function (doc) {
var numPages = doc.numPages; var numPages = doc.numPages;
console.log('# Document Loaded'); console.log('# Document Loaded');
console.log('Number of Pages: ' + numPages); console.log('Number of Pages: ' + numPages);

Loading…
Cancel
Save