diff --git a/bower.json b/bower.json index 2da402078..8cde6c79a 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.469", + "version": "1.0.471", "keywords": [ "Mozilla", "pdf", diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 8d2bc434b..e850a170a 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.469'; -PDFJS.build = '780f86b'; +PDFJS.version = '1.0.471'; +PDFJS.build = 'faa9020'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -7664,10 +7664,14 @@ var PDFDocument = (function PDFDocumentClosure() { function find(stream, needle, limit, backwards) { var pos = stream.pos; var end = stream.end; + var strBuf = []; if (pos + limit > end) { limit = end - pos; } - var str = bytesToString(stream.getBytes(limit)); + for (var n = 0; n < limit; ++n) { + strBuf.push(String.fromCharCode(stream.getByte())); + } + var str = strBuf.join(''); stream.pos = pos; var index = backwards ? str.lastIndexOf(needle) : str.indexOf(needle); if (index == -1) { @@ -41877,10 +41881,12 @@ var FlateStream = (function FlateStreamClosure() { this.eof = true; } } else { - var block = str.getBytes(blockLen); - buffer.set(block, bufferLength); - if (block.length < blockLen) { - this.eof = true; + for (var n = bufferLength; n < end; ++n) { + if ((b = str.getByte()) === -1) { + this.eof = true; + break; + } + buffer[n] = b; } } return; diff --git a/build/pdf.js b/build/pdf.js index 5c74c66e5..6f6c3fb89 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.469'; -PDFJS.build = '780f86b'; +PDFJS.version = '1.0.471'; +PDFJS.build = 'faa9020'; (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 2b91fbb5f..1525b05a6 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.469'; -PDFJS.build = '780f86b'; +PDFJS.version = '1.0.471'; +PDFJS.build = 'faa9020'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -2810,10 +2810,14 @@ var PDFDocument = (function PDFDocumentClosure() { function find(stream, needle, limit, backwards) { var pos = stream.pos; var end = stream.end; + var strBuf = []; if (pos + limit > end) { limit = end - pos; } - var str = bytesToString(stream.getBytes(limit)); + for (var n = 0; n < limit; ++n) { + strBuf.push(String.fromCharCode(stream.getByte())); + } + var str = strBuf.join(''); stream.pos = pos; var index = backwards ? str.lastIndexOf(needle) : str.indexOf(needle); if (index == -1) { @@ -37023,10 +37027,12 @@ var FlateStream = (function FlateStreamClosure() { this.eof = true; } } else { - var block = str.getBytes(blockLen); - buffer.set(block, bufferLength); - if (block.length < blockLen) { - this.eof = true; + for (var n = bufferLength; n < end; ++n) { + if ((b = str.getByte()) === -1) { + this.eof = true; + break; + } + buffer[n] = b; } } return; diff --git a/package.json b/package.json index d1bd31809..7fa478abd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.469", + "version": "1.0.471", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",