mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Fixes "TypeError: info is undefined"
This commit is contained in:
parent
d3e8449373
commit
500421ddd2
1 changed files with 3 additions and 4 deletions
|
@ -526,13 +526,12 @@ var PDFDocument = (function PDFDocumentClosure() {
|
|||
return shadow(this, 'numPages', num);
|
||||
},
|
||||
getDocumentInfo: function PDFDocument_getDocumentInfo() {
|
||||
var docInfo;
|
||||
var docInfo = {
|
||||
PDFFormatVersion: this.pdfFormatVersion
|
||||
};
|
||||
if (this.xref.trailer.has('Info')) {
|
||||
var infoDict = this.xref.trailer.get('Info');
|
||||
|
||||
docInfo = {
|
||||
PDFFormatVersion: this.pdfFormatVersion
|
||||
};
|
||||
var validEntries = DocumentInfoValidators.entries;
|
||||
// Only fill the document info with valid entries from the spec.
|
||||
for (var key in validEntries) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue