From fd1f0f647f46e858d731f598fc1022ba1762b610 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 23 Sep 2021 15:02:24 +0200 Subject: [PATCH] Print a special warning message, in the viewer, for XFA Foreground documents Currently XFAF documents use the same warning message as in the XFA *disabled* case, which is neither helpful nor correct. --- src/display/api.js | 1 + web/app.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/display/api.js b/src/display/api.js index 61a1b8500..46a5331f0 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -3060,6 +3060,7 @@ class WorkerTransport { const params = this._params; return shadow(this, "loadingParams", { disableAutoFetch: params.disableAutoFetch, + enableXfa: params.enableXfa, }); } } diff --git a/web/app.js b/web/app.js index 125383681..01f303e04 100644 --- a/web/app.js +++ b/web/app.js @@ -1555,10 +1555,13 @@ const PDFViewerApplication = { if ( info.IsXFAPresent && !info.IsAcroFormPresent && - // Note: `isPureXfa === true` implies that `enableXfa = true` was set. !pdfDocument.isPureXfa ) { - console.warn("Warning: XFA support is not enabled"); + if (pdfDocument.loadingParams.enableXfa) { + console.warn("Warning: XFA Foreground documents are not supported"); + } else { + console.warn("Warning: XFA support is not enabled"); + } this.fallback(UNSUPPORTED_FEATURES.forms); } else if ( (info.IsAcroFormPresent || info.IsXFAPresent) &&