From a0a4cd3f8a0f5d56040467f0e162a4e27dbac78b Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Fri, 7 May 2021 14:37:47 +0200 Subject: [PATCH] Add option enableXfa to the viewer --- extensions/chromium/preferences_schema.json | 4 ++++ web/app.js | 2 +- web/app_options.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/extensions/chromium/preferences_schema.json b/extensions/chromium/preferences_schema.json index e958ef40f..357441848 100644 --- a/extensions/chromium/preferences_schema.json +++ b/extensions/chromium/preferences_schema.json @@ -159,6 +159,10 @@ "type": "boolean", "default": false }, + "enableXfa": { + "type": "boolean", + "default": false + }, "historyUpdateUrl": { "type": "boolean", "default": false diff --git a/web/app.js b/web/app.js index da46c330c..ba3cac5da 100644 --- a/web/app.js +++ b/web/app.js @@ -1555,7 +1555,7 @@ const PDFViewerApplication = { // Note: `isPureXfa === true` implies that `enableXfa = true` was set. !pdfDocument.isPureXfa ) { - console.warn("Warning: XFA is not supported"); + console.warn("Warning: XFA 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 df3d1dc46..d8d999076 100644 --- a/web/app_options.js +++ b/web/app_options.js @@ -206,7 +206,7 @@ const defaultOptions = { enableXfa: { /** @type {boolean} */ value: false, - kind: OptionKind.API, + kind: OptionKind.API + OptionKind.PREFERENCE, }, fontExtraProperties: { /** @type {boolean} */