1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-21 23:58:07 +02:00

Attempt to provide better default values for the disableFontFace/nativeImageDecoderSupport API options in Node.js

This should provide a better out-of-the-box experience when using PDF.js in a Node.js environment, since it's missing native support for both `@font-face` and `Image`.
Please note that this change *only* affects the default values, hence it's still possible for an API consumer to override those values when calling `getDocument`.

Also, prevents "ReferenceError: document is not defined" errors, when running the unit-tests in Node.js/Travis.
This commit is contained in:
Jonas Jenwald 2018-06-01 12:52:29 +02:00
parent dcc7f33ee7
commit 0ecc22cb04
4 changed files with 22 additions and 19 deletions

View file

@ -37,8 +37,5 @@ if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {
}
})();
}
const viewerCompatibilityParams = Object.freeze(compatibilityParams);
export {
viewerCompatibilityParams,
};
exports.viewerCompatibilityParams = Object.freeze(compatibilityParams);