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.
This commit is contained in:
Jonas Jenwald 2021-09-23 15:02:24 +02:00
parent c914e9f0a6
commit fd1f0f647f
2 changed files with 6 additions and 2 deletions

View File

@ -3060,6 +3060,7 @@ class WorkerTransport {
const params = this._params;
return shadow(this, "loadingParams", {
disableAutoFetch: params.disableAutoFetch,
enableXfa: params.enableXfa,
});
}
}

View File

@ -1555,10 +1555,13 @@ const PDFViewerApplication = {
if (
info.IsXFAPresent &&
!info.IsAcroFormPresent &&
// Note: `isPureXfa === true` implies that `enableXfa = true` was set.
!pdfDocument.isPureXfa
) {
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) &&