diff --git a/src/core.js b/src/core.js index 2e6991caa..822175f5d 100644 --- a/src/core.js +++ b/src/core.js @@ -535,7 +535,8 @@ var PDFDocument = (function PDFDocumentClosure() { }, getDocumentInfo: function PDFDocument_getDocumentInfo() { var docInfo = { - PDFFormatVersion: this.pdfFormatVersion + PDFFormatVersion: this.pdfFormatVersion, + IsAcroFormPresent: !!this.acroForm }; if (this.xref.trailer.has('Info')) { var infoDict = this.xref.trailer.get('Info'); diff --git a/web/viewer.js b/web/viewer.js index 6fd11e927..a2b41da4f 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -1345,6 +1345,11 @@ var PDFView = { if (pdfTitle) self.setTitle(pdfTitle + ' - ' + document.title); + + if (info.IsAcroFormPresent) { + // AcroForm/XFA was found + PDFView.fallback(); + } }); }, @@ -1955,10 +1960,6 @@ var PageView = function pageView(container, pdfPage, id, scale, if (textAnnotation) div.appendChild(textAnnotation); break; - case 'Widget': - // TODO: support forms - PDFView.fallback(); - break; } } });