Disable the NativeImageDecoder
in the node/pdf2svg.js
example (issue 7901)
It doesn't really make sense to attempt to utilize the `NativeImageDecoder` in Node, since there's no native image support available, hence building on PR 8035 we can easily disable it in the example. Fixes 7901.
This commit is contained in:
parent
31f8875614
commit
d76cfc0610
@ -44,7 +44,10 @@ function getFileNameFromPath(path) {
|
||||
|
||||
// Will be using promises to load document, pages and misc data instead of
|
||||
// callback.
|
||||
pdfjsLib.getDocument(data).then(function (doc) {
|
||||
pdfjsLib.getDocument({
|
||||
data: data,
|
||||
disableNativeImageDecoder: true,
|
||||
}).then(function (doc) {
|
||||
var numPages = doc.numPages;
|
||||
console.log('# Document Loaded');
|
||||
console.log('Number of Pages: ' + numPages);
|
||||
|
Loading…
x
Reference in New Issue
Block a user