Merge pull request #2426 from yurydelendik/fix-2346
Fixes "TypeError: info is undefined"
This commit is contained in:
commit
f3ff673240
@ -526,13 +526,12 @@ var PDFDocument = (function PDFDocumentClosure() {
|
|||||||
return shadow(this, 'numPages', num);
|
return shadow(this, 'numPages', num);
|
||||||
},
|
},
|
||||||
getDocumentInfo: function PDFDocument_getDocumentInfo() {
|
getDocumentInfo: function PDFDocument_getDocumentInfo() {
|
||||||
var docInfo;
|
var docInfo = {
|
||||||
|
PDFFormatVersion: this.pdfFormatVersion
|
||||||
|
};
|
||||||
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');
|
||||||
|
|
||||||
docInfo = {
|
|
||||||
PDFFormatVersion: this.pdfFormatVersion
|
|
||||||
};
|
|
||||||
var validEntries = DocumentInfoValidators.entries;
|
var validEntries = DocumentInfoValidators.entries;
|
||||||
// Only fill the document info with valid entries from the spec.
|
// Only fill the document info with valid entries from the spec.
|
||||||
for (var key in validEntries) {
|
for (var key in validEntries) {
|
||||||
|
Loading…
Reference in New Issue
Block a user