Merge pull request #8183 from Snuffleupagus/documentInfo-MissingDataException

Ensure that `PDFDocument.documentInfo` doesn't fail during document load, when the entire XRef table hasn't been fetched yet (issue 8180)
This commit is contained in:
Rob Wu 2017-03-22 14:46:08 +01:00 committed by GitHub
commit 086021b21e

View File

@ -595,6 +595,9 @@ var PDFDocument = (function PDFDocumentClosure() {
try { try {
infoDict = this.xref.trailer.get('Info'); infoDict = this.xref.trailer.get('Info');
} catch (err) { } catch (err) {
if (err instanceof MissingDataException) {
throw err;
}
info('The document information dictionary is invalid.'); info('The document information dictionary is invalid.');
} }
if (infoDict) { if (infoDict) {