1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

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

@ -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) &&