1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #13984 from Snuffleupagus/viewer-enableXfa

Enable XFA by default in the viewer, and `components/` examples (issue 13968)
This commit is contained in:
Tim van der Meij 2021-09-15 22:44:59 +02:00 committed by GitHub
commit 95435ed66f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 12 deletions

View file

@ -55,8 +55,9 @@ const OptionKind = {
};
/**
* PLEASE NOTE: To avoid introducing unnecessary dependencies, we specify the
* values below *explicitly* rather than relying on imported types.
* NOTE: These options are used to generate the `default_preferences.json` file,
* see `OptionKind.PREFERENCE`, hence the values below must use only
* primitive types and cannot rely on any imported types.
*/
const defaultOptions = {
annotationMode: {
@ -226,9 +227,7 @@ const defaultOptions = {
},
enableXfa: {
/** @type {boolean} */
value:
typeof PDFJSDev === "undefined" ||
PDFJSDev.test("!PRODUCTION || TESTING"),
value: true,
kind: OptionKind.API + OptionKind.PREFERENCE,
},
fontExtraProperties: {

View file

@ -244,6 +244,7 @@ class DefaultTextLayerFactory {
viewport,
enhanceTextSelection,
eventBus,
highlighter,
});
}
}