From e5845739fd9f839f7b0db3c281d02c362d8bac0b Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Fri, 16 Jul 2021 14:12:24 +0200 Subject: [PATCH] Enable XFA by default in the development viewer Given that https://bugzilla.mozilla.org/show_bug.cgi?id=1720402 has just landed, enabling XFA in the development viewer probably cannot hurt now. --- web/app.js | 2 +- web/app_options.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app.js b/web/app.js index 8abeb927f..2c09a3da6 100644 --- a/web/app.js +++ b/web/app.js @@ -1547,7 +1547,7 @@ const PDFViewerApplication = { // Note: `isPureXfa === true` implies that `enableXfa = true` was set. !pdfDocument.isPureXfa ) { - console.warn("Warning: XFA is not enabled"); + console.warn("Warning: XFA support is not enabled"); this.fallback(UNSUPPORTED_FEATURES.forms); } else if ( (info.IsAcroFormPresent || info.IsXFAPresent) && diff --git a/web/app_options.js b/web/app_options.js index 7b5273a0a..3a6be8ac8 100644 --- a/web/app_options.js +++ b/web/app_options.js @@ -194,7 +194,7 @@ const defaultOptions = { }, enableXfa: { /** @type {boolean} */ - value: false, + value: typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION"), kind: OptionKind.API + OptionKind.PREFERENCE, }, fontExtraProperties: {