Browse Source

PDF.js version 1.0.391

master v1.0.391
Yury Delendik 10 years ago
parent
commit
1e5a72bfe4
  1. 2
      bower.json
  2. 19
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 19
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.0.389", "version": "1.0.391",
"keywords": [ "keywords": [
"Mozilla", "Mozilla",
"pdf", "pdf",

19
build/pdf.combined.js

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.389'; PDFJS.version = '1.0.391';
PDFJS.build = 'bab40ca'; PDFJS.build = '011eb84';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
@ -7204,6 +7204,7 @@ var ChunkedStream = (function ChunkedStreamClosure() {
this.numChunks = Math.ceil(length / chunkSize); this.numChunks = Math.ceil(length / chunkSize);
this.manager = manager; this.manager = manager;
this.initialDataLength = 0; this.initialDataLength = 0;
this.lastSuccessfulEnsureByteChunk = -1; // a single-entry cache
} }
// required methods for a stream. if a particular stream does not // required methods for a stream. if a particular stream does not
@ -7263,6 +7264,18 @@ var ChunkedStream = (function ChunkedStreamClosure() {
} }
}, },
ensureByte: function ChunkedStream_ensureRange(pos) {
var chunk = Math.floor(pos / this.chunkSize);
if (chunk === this.lastSuccessfulEnsureByteChunk) {
return;
}
if (!(chunk in this.loadedChunks)) {
throw new MissingDataException(pos, pos + 1);
}
this.lastSuccessfulEnsureByteChunk = chunk;
},
ensureRange: function ChunkedStream_ensureRange(begin, end) { ensureRange: function ChunkedStream_ensureRange(begin, end) {
if (begin >= end) { if (begin >= end) {
return; return;
@ -7315,7 +7328,7 @@ var ChunkedStream = (function ChunkedStreamClosure() {
if (pos >= this.end) { if (pos >= this.end) {
return -1; return -1;
} }
this.ensureRange(pos, pos + 1); this.ensureByte(pos);
return this.bytes[this.pos++]; return this.bytes[this.pos++];
}, },

4
build/pdf.js

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.389'; PDFJS.version = '1.0.391';
PDFJS.build = 'bab40ca'; PDFJS.build = '011eb84';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it

19
build/pdf.worker.js vendored

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.389'; PDFJS.version = '1.0.391';
PDFJS.build = 'bab40ca'; PDFJS.build = '011eb84';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
@ -2603,6 +2603,7 @@ var ChunkedStream = (function ChunkedStreamClosure() {
this.numChunks = Math.ceil(length / chunkSize); this.numChunks = Math.ceil(length / chunkSize);
this.manager = manager; this.manager = manager;
this.initialDataLength = 0; this.initialDataLength = 0;
this.lastSuccessfulEnsureByteChunk = -1; // a single-entry cache
} }
// required methods for a stream. if a particular stream does not // required methods for a stream. if a particular stream does not
@ -2662,6 +2663,18 @@ var ChunkedStream = (function ChunkedStreamClosure() {
} }
}, },
ensureByte: function ChunkedStream_ensureRange(pos) {
var chunk = Math.floor(pos / this.chunkSize);
if (chunk === this.lastSuccessfulEnsureByteChunk) {
return;
}
if (!(chunk in this.loadedChunks)) {
throw new MissingDataException(pos, pos + 1);
}
this.lastSuccessfulEnsureByteChunk = chunk;
},
ensureRange: function ChunkedStream_ensureRange(begin, end) { ensureRange: function ChunkedStream_ensureRange(begin, end) {
if (begin >= end) { if (begin >= end) {
return; return;
@ -2714,7 +2727,7 @@ var ChunkedStream = (function ChunkedStreamClosure() {
if (pos >= this.end) { if (pos >= this.end) {
return -1; return -1;
} }
this.ensureRange(pos, pos + 1); this.ensureByte(pos);
return this.bytes[this.pos++]; return this.bytes[this.pos++];
}, },

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.0.389", "version": "1.0.391",
"description": "Generic build of Mozilla's PDF.js library.", "description": "Generic build of Mozilla's PDF.js library.",
"keywords": [ "keywords": [
"Mozilla", "Mozilla",

Loading…
Cancel
Save