Skip to content

Commit d426ffd

Browse files
Merge pull request #13125 from Snuffleupagus/BaseViewer-enableXfa
Don't provide the `enableXfa` parameter to the `BaseViewer` constructor, and avoid the fallback bar with `enableXfa = true` set (PR 13069 follow-up)
2 parents 8e736e4 + 35a088f commit d426ffd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

web/app.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@ const PDFViewerApplication = {
518518
useOnlyCssZoom: AppOptions.get("useOnlyCssZoom"),
519519
maxCanvasPixels: AppOptions.get("maxCanvasPixels"),
520520
enableScripting: AppOptions.get("enableScripting"),
521-
enableXfa: AppOptions.get("enableXfa"),
522521
});
523522
pdfRenderingQueue.setViewer(this.pdfViewer);
524523
pdfLinkService.setViewer(this.pdfViewer);
@@ -1561,7 +1560,12 @@ const PDFViewerApplication = {
15611560
this.setTitle(contentDispositionFilename);
15621561
}
15631562

1564-
if (info.IsXFAPresent && !info.IsAcroFormPresent) {
1563+
if (
1564+
info.IsXFAPresent &&
1565+
!info.IsAcroFormPresent &&
1566+
// Note: `isPureXfa === true` implies that `enableXfa = true` was set.
1567+
!pdfDocument.isPureXfa
1568+
) {
15651569
console.warn("Warning: XFA is not supported");
15661570
this._delayedFallback(UNSUPPORTED_FEATURES.forms);
15671571
} else if (

0 commit comments

Comments
 (0)