From d76cfc06107be67279117f1773d371a6121d5c26 Mon Sep 17 00:00:00 2001
From: Jonas Jenwald <jonas.jenwald@gmail.com>
Date: Tue, 4 Apr 2017 17:18:25 +0200
Subject: [PATCH] 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.
---
 examples/node/pdf2svg.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/examples/node/pdf2svg.js b/examples/node/pdf2svg.js
index 00d412169..5f09209d7 100644
--- a/examples/node/pdf2svg.js
+++ b/examples/node/pdf2svg.js
@@ -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);