Merge pull request #2650 from yurydelendik/form-bar
Fallback when AcroForm is present
This commit is contained in:
commit
1a1c5abca6
@ -535,7 +535,8 @@ var PDFDocument = (function PDFDocumentClosure() {
|
|||||||
},
|
},
|
||||||
getDocumentInfo: function PDFDocument_getDocumentInfo() {
|
getDocumentInfo: function PDFDocument_getDocumentInfo() {
|
||||||
var docInfo = {
|
var docInfo = {
|
||||||
PDFFormatVersion: this.pdfFormatVersion
|
PDFFormatVersion: this.pdfFormatVersion,
|
||||||
|
IsAcroFormPresent: !!this.acroForm
|
||||||
};
|
};
|
||||||
if (this.xref.trailer.has('Info')) {
|
if (this.xref.trailer.has('Info')) {
|
||||||
var infoDict = this.xref.trailer.get('Info');
|
var infoDict = this.xref.trailer.get('Info');
|
||||||
|
@ -1345,6 +1345,11 @@ var PDFView = {
|
|||||||
|
|
||||||
if (pdfTitle)
|
if (pdfTitle)
|
||||||
self.setTitle(pdfTitle + ' - ' + document.title);
|
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)
|
if (textAnnotation)
|
||||||
div.appendChild(textAnnotation);
|
div.appendChild(textAnnotation);
|
||||||
break;
|
break;
|
||||||
case 'Widget':
|
|
||||||
// TODO: support forms
|
|
||||||
PDFView.fallback();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user