From 4a8e00741efe4ba2a761323570b9b3a69b633966 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Mon, 22 Sep 2014 16:25:27 -0500 Subject: [PATCH] PDF.js version 1.0.308 --- bower.json | 2 +- build/pdf.combined.js | 16 ++++++++++++---- build/pdf.js | 4 ++-- build/pdf.worker.js | 16 ++++++++++++---- package.json | 2 +- 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/bower.json b/bower.json index 2932f2f2e..5cecda4d1 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.306", + "version": "1.0.308", "keywords": [ "Mozilla", "pdf", diff --git a/build/pdf.combined.js b/build/pdf.combined.js index c9712c495..1d3f6226c 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.306'; -PDFJS.build = '2da1942'; +PDFJS.version = '1.0.308'; +PDFJS.build = 'fc85cfd'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -9438,9 +9438,10 @@ var XRef = (function XRefClosure() { } else { xrefEntry = this.fetchCompressed(xrefEntry, suppressEncryption); } - - if (isDict(xrefEntry)) { + if (isDict(xrefEntry)){ xrefEntry.objId = 'R' + ref.num + '.' + ref.gen; + } else if (isStream(xrefEntry)) { + xrefEntry.dict.objId = 'R' + ref.num + '.' + ref.gen; } return xrefEntry; }, @@ -20092,6 +20093,13 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { if (!isStream(xObject)) { continue; } + if (xObject.dict.objId) { + if (processed[xObject.dict.objId]) { + // stream has objId and is processed already + continue; + } + processed[xObject.dict.objId] = true; + } var xResources = xObject.dict.get('Resources'); // Checking objId to detect an infinite loop. if (isDict(xResources) && diff --git a/build/pdf.js b/build/pdf.js index 6d726b74e..da90442ef 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.306'; -PDFJS.build = '2da1942'; +PDFJS.version = '1.0.308'; +PDFJS.build = 'fc85cfd'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/build/pdf.worker.js b/build/pdf.worker.js index 03eb8218c..a9551f5fa 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.306'; -PDFJS.build = '2da1942'; +PDFJS.version = '1.0.308'; +PDFJS.build = 'fc85cfd'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -4931,9 +4931,10 @@ var XRef = (function XRefClosure() { } else { xrefEntry = this.fetchCompressed(xrefEntry, suppressEncryption); } - - if (isDict(xrefEntry)) { + if (isDict(xrefEntry)){ xrefEntry.objId = 'R' + ref.num + '.' + ref.gen; + } else if (isStream(xrefEntry)) { + xrefEntry.dict.objId = 'R' + ref.num + '.' + ref.gen; } return xrefEntry; }, @@ -15585,6 +15586,13 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { if (!isStream(xObject)) { continue; } + if (xObject.dict.objId) { + if (processed[xObject.dict.objId]) { + // stream has objId and is processed already + continue; + } + processed[xObject.dict.objId] = true; + } var xResources = xObject.dict.get('Resources'); // Checking objId to detect an infinite loop. if (isDict(xResources) && diff --git a/package.json b/package.json index ff1133902..e34435144 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.306", + "version": "1.0.308", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",