Merge pull request #2650 from yurydelendik/form-bar

Fallback when AcroForm is present
This commit is contained in:
Mack Duan 2013-01-31 14:07:01 -08:00
commit 1a1c5abca6
2 changed files with 7 additions and 5 deletions

View File

@ -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');

View File

@ -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;
}
}
});