diff --git a/bower.json b/bower.json index 2d3116e6b..4812d5efa 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.500", + "version": "1.1.503", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 45655e4d5..679194b3f 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.1.500'; -PDFJS.build = '39d7593'; +PDFJS.version = '1.1.503'; +PDFJS.build = '5e4910f'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -10590,6 +10590,7 @@ var XRef = (function XRefClosure() { } return skipped; } + var objRegExp = /^(\d+)\s+(\d+)\s+obj\b/; var trailerBytes = new Uint8Array([116, 114, 97, 105, 108, 101, 114]); var startxrefBytes = new Uint8Array([115, 116, 97, 114, 116, 120, 114, 101, 102]); @@ -10627,7 +10628,7 @@ var XRef = (function XRefClosure() { position += skipUntil(buffer, position, trailerBytes); trailers.push(position); position += skipUntil(buffer, position, startxrefBytes); - } else if ((m = /^(\d+)\s+(\d+)\s+obj\b/.exec(token))) { + } else if ((m = objRegExp.exec(token))) { if (typeof this.entries[m[1]] === 'undefined') { this.entries[m[1]] = { offset: position - stream.start, @@ -10648,6 +10649,10 @@ var XRef = (function XRefClosure() { } position += contentLength; + } else if (token.indexOf('trailer') === 0 && + (token.length === 7 || /\s/.test(token[7]))) { + trailers.push(position); + position += skipUntil(buffer, position, startxrefBytes); } else { position += token.length + 1; } diff --git a/build/pdf.js b/build/pdf.js index 0d0dbc8c0..6ec84ffef 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.1.500'; -PDFJS.build = '39d7593'; +PDFJS.version = '1.1.503'; +PDFJS.build = '5e4910f'; (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 232740dc8..233ab89b9 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.1.500'; -PDFJS.build = '39d7593'; +PDFJS.version = '1.1.503'; +PDFJS.build = '5e4910f'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -4139,6 +4139,7 @@ var XRef = (function XRefClosure() { } return skipped; } + var objRegExp = /^(\d+)\s+(\d+)\s+obj\b/; var trailerBytes = new Uint8Array([116, 114, 97, 105, 108, 101, 114]); var startxrefBytes = new Uint8Array([115, 116, 97, 114, 116, 120, 114, 101, 102]); @@ -4176,7 +4177,7 @@ var XRef = (function XRefClosure() { position += skipUntil(buffer, position, trailerBytes); trailers.push(position); position += skipUntil(buffer, position, startxrefBytes); - } else if ((m = /^(\d+)\s+(\d+)\s+obj\b/.exec(token))) { + } else if ((m = objRegExp.exec(token))) { if (typeof this.entries[m[1]] === 'undefined') { this.entries[m[1]] = { offset: position - stream.start, @@ -4197,6 +4198,10 @@ var XRef = (function XRefClosure() { } position += contentLength; + } else if (token.indexOf('trailer') === 0 && + (token.length === 7 || /\s/.test(token[7]))) { + trailers.push(position); + position += skipUntil(buffer, position, startxrefBytes); } else { position += token.length + 1; } diff --git a/package.json b/package.json index d3c864bd0..2f23e693f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.500", + "version": "1.1.503", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",