Merge pull request #13745 from Snuffleupagus/dev-enableXfa

Enable XFA by default in the development viewer
This commit is contained in:
Tim van der Meij 2021-07-18 13:03:31 +02:00 committed by GitHub
commit 2d1f60f655
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1547,7 +1547,7 @@ const PDFViewerApplication = {
// Note: `isPureXfa === true` implies that `enableXfa = true` was set. // Note: `isPureXfa === true` implies that `enableXfa = true` was set.
!pdfDocument.isPureXfa !pdfDocument.isPureXfa
) { ) {
console.warn("Warning: XFA is not enabled"); console.warn("Warning: XFA support is not enabled");
this.fallback(UNSUPPORTED_FEATURES.forms); this.fallback(UNSUPPORTED_FEATURES.forms);
} else if ( } else if (
(info.IsAcroFormPresent || info.IsXFAPresent) && (info.IsAcroFormPresent || info.IsXFAPresent) &&

View File

@ -194,7 +194,7 @@ const defaultOptions = {
}, },
enableXfa: { enableXfa: {
/** @type {boolean} */ /** @type {boolean} */
value: false, value: typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION"),
kind: OptionKind.API + OptionKind.PREFERENCE, kind: OptionKind.API + OptionKind.PREFERENCE,
}, },
fontExtraProperties: { fontExtraProperties: {