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

Enable XFA by default in the viewer, and components/ examples (issue 13968)

Given that https://bugzilla.mozilla.org/show_bug.cgi?id=1727396 has now landed, it should now be OK to make this change.
This commit is contained in:
Jonas Jenwald 2021-09-08 12:33:59 +02:00
parent 064c21d360
commit 7498b97aaa
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,
});
}
}