From da62be0685e15b26dbbaa9a7c79fdec870b223ad Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Wed, 12 Aug 2020 09:17:58 -0700 Subject: [PATCH] Enable renderInteractiveForms by default. --- extensions/chromium/preferences_schema.json | 2 +- web/app.js | 10 ++++++++-- web/app_options.js | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/extensions/chromium/preferences_schema.json b/extensions/chromium/preferences_schema.json index e15fc32ad480e..149a4fcd85172 100644 --- a/extensions/chromium/preferences_schema.json +++ b/extensions/chromium/preferences_schema.json @@ -149,7 +149,7 @@ }, "renderInteractiveForms": { "type": "boolean", - "default": false + "default": true }, "enablePermissions": { "type": "boolean", diff --git a/web/app.js b/web/app.js index d568e049bf3cf..4bd905ceeb8ee 100644 --- a/web/app.js +++ b/web/app.js @@ -1415,8 +1415,14 @@ const PDFViewerApplication = { this.setTitle(contentDispositionFilename); } - if (info.IsAcroFormPresent) { - console.warn("Warning: AcroForm/XFA is not supported"); + if (info.IsXFAPresent) { + console.warn("Warning: XFA is not supported"); + this._delayedFallback(UNSUPPORTED_FEATURES.forms); + } else if ( + info.IsAcroFormPresent && + !this.pdfViewer.renderInteractiveForms + ) { + console.warn("Warning: AcroForm support is not enabled"); this._delayedFallback(UNSUPPORTED_FEATURES.forms); } diff --git a/web/app_options.js b/web/app_options.js index 27433d1ed851a..ec8f628e98eb2 100644 --- a/web/app_options.js +++ b/web/app_options.js @@ -121,7 +121,7 @@ const defaultOptions = { }, renderInteractiveForms: { /** @type {boolean} */ - value: false, + value: true, kind: OptionKind.VIEWER + OptionKind.PREFERENCE, }, sidebarViewOnLoad: {