From 500421ddd2fea5b8ca36786d3c0b7cb986f120fe Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Fri, 30 Nov 2012 17:36:39 -0600 Subject: [PATCH] Fixes "TypeError: info is undefined" --- src/core.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/core.js b/src/core.js index bd9ff7da2..4a8b346d2 100644 --- a/src/core.js +++ b/src/core.js @@ -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) {