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 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.0.389",
"version": "1.0.391",
"keywords": [
"Mozilla",
"pdf",

19
build/pdf.combined.js

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

4
build/pdf.js

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

2
package.json

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

Loading…
Cancel
Save