Browse Source

PDF.js version 1.3.48 - See mozilla/pdf.js@5f56a20b34848b4e9f09fd479582d3a84cbe7fb5

master v1.3.48
Pdf Bot 9 years ago
parent
commit
91c2405d46
  1. 2
      bower.json
  2. 163
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 163
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.3.46",
"version": "1.3.48",
"main": [
"build/pdf.js",
"build/pdf.worker.js"

163
build/pdf.combined.js

@ -20,8 +20,8 @@ if (typeof PDFJS === 'undefined') { @@ -20,8 +20,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.3.46';
PDFJS.build = '4a82f2f';
PDFJS.version = '1.3.48';
PDFJS.build = '5f56a20';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
@ -9520,7 +9520,6 @@ var ChunkedStreamManager = (function ChunkedStreamManagerClosure() { @@ -9520,7 +9520,6 @@ var ChunkedStreamManager = (function ChunkedStreamManagerClosure() {
})();
// TODO(mack): Make use of PDFJS.Util.inherit() when it becomes available
var BasePdfManager = (function BasePdfManagerClosure() {
function BasePdfManager() {
throw new Error('Cannot initialize BaseManagerManager');
@ -9547,7 +9546,7 @@ var BasePdfManager = (function BasePdfManagerClosure() { @@ -9547,7 +9546,7 @@ var BasePdfManager = (function BasePdfManagerClosure() {
return this.ensure(this.pdfDocument.catalog, prop, args);
},
getPage: function BasePdfManager_pagePage(pageIndex) {
getPage: function BasePdfManager_getPage(pageIndex) {
return this.pdfDocument.getPage(pageIndex);
},
@ -9559,7 +9558,7 @@ var BasePdfManager = (function BasePdfManagerClosure() { @@ -9559,7 +9558,7 @@ var BasePdfManager = (function BasePdfManagerClosure() {
return new NotImplementedException();
},
requestRange: function BasePdfManager_ensure(begin, end) {
requestRange: function BasePdfManager_requestRange(begin, end) {
return new NotImplementedException();
},
@ -9600,45 +9599,40 @@ var LocalPdfManager = (function LocalPdfManagerClosure() { @@ -9600,45 +9599,40 @@ var LocalPdfManager = (function LocalPdfManagerClosure() {
this._loadedStreamCapability.resolve(stream);
}
LocalPdfManager.prototype = Object.create(BasePdfManager.prototype);
LocalPdfManager.prototype.constructor = LocalPdfManager;
LocalPdfManager.prototype.ensure =
function LocalPdfManager_ensure(obj, prop, args) {
return new Promise(function (resolve, reject) {
try {
var value = obj[prop];
var result;
if (typeof value === 'function') {
result = value.apply(obj, args);
} else {
result = value;
Util.inherit(LocalPdfManager, BasePdfManager, {
ensure: function LocalPdfManager_ensure(obj, prop, args) {
return new Promise(function (resolve, reject) {
try {
var value = obj[prop];
var result;
if (typeof value === 'function') {
result = value.apply(obj, args);
} else {
result = value;
}
resolve(result);
} catch (e) {
reject(e);
}
resolve(result);
} catch (e) {
reject(e);
}
});
};
});
},
LocalPdfManager.prototype.requestRange =
function LocalPdfManager_requestRange(begin, end) {
return Promise.resolve();
};
requestRange: function LocalPdfManager_requestRange(begin, end) {
return Promise.resolve();
},
LocalPdfManager.prototype.requestLoadedStream =
function LocalPdfManager_requestLoadedStream() {
};
requestLoadedStream: function LocalPdfManager_requestLoadedStream() {
return;
},
LocalPdfManager.prototype.onLoadedStream =
function LocalPdfManager_getLoadedStream() {
return this._loadedStreamCapability.promise;
};
onLoadedStream: function LocalPdfManager_onLoadedStream() {
return this._loadedStreamCapability.promise;
},
LocalPdfManager.prototype.terminate =
function LocalPdfManager_terminate() {
return;
};
terminate: function LocalPdfManager_terminate() {
return;
}
});
return LocalPdfManager;
})();
@ -9659,67 +9653,60 @@ var NetworkPdfManager = (function NetworkPdfManagerClosure() { @@ -9659,67 +9653,60 @@ var NetworkPdfManager = (function NetworkPdfManagerClosure() {
this.streamManager = new ChunkedStreamManager(args.length,
args.rangeChunkSize,
args.url, params);
this.pdfDocument = new PDFDocument(this, this.streamManager.getStream(),
args.password);
args.password);
}
NetworkPdfManager.prototype = Object.create(BasePdfManager.prototype);
NetworkPdfManager.prototype.constructor = NetworkPdfManager;
NetworkPdfManager.prototype.ensure =
function NetworkPdfManager_ensure(obj, prop, args) {
var pdfManager = this;
Util.inherit(NetworkPdfManager, BasePdfManager, {
ensure: function NetworkPdfManager_ensure(obj, prop, args) {
var pdfManager = this;
return new Promise(function (resolve, reject) {
function ensureHelper() {
try {
var result;
var value = obj[prop];
if (typeof value === 'function') {
result = value.apply(obj, args);
} else {
result = value;
}
resolve(result);
} catch(e) {
if (!(e instanceof MissingDataException)) {
reject(e);
return;
return new Promise(function (resolve, reject) {
function ensureHelper() {
try {
var result;
var value = obj[prop];
if (typeof value === 'function') {
result = value.apply(obj, args);
} else {
result = value;
}
resolve(result);
} catch(e) {
if (!(e instanceof MissingDataException)) {
reject(e);
return;
}
pdfManager.streamManager.requestRange(e.begin, e.end).
then(ensureHelper, reject);
}
pdfManager.streamManager.requestRange(e.begin, e.end).
then(ensureHelper, reject);
}
}
ensureHelper();
});
};
ensureHelper();
});
},
NetworkPdfManager.prototype.requestRange =
function NetworkPdfManager_requestRange(begin, end) {
return this.streamManager.requestRange(begin, end);
};
requestRange: function NetworkPdfManager_requestRange(begin, end) {
return this.streamManager.requestRange(begin, end);
},
NetworkPdfManager.prototype.requestLoadedStream =
function NetworkPdfManager_requestLoadedStream() {
this.streamManager.requestAllChunks();
};
requestLoadedStream: function NetworkPdfManager_requestLoadedStream() {
this.streamManager.requestAllChunks();
},
NetworkPdfManager.prototype.sendProgressiveData =
function NetworkPdfManager_sendProgressiveData(chunk) {
this.streamManager.onReceiveData({ chunk: chunk });
};
sendProgressiveData:
function NetworkPdfManager_sendProgressiveData(chunk) {
this.streamManager.onReceiveData({ chunk: chunk });
},
NetworkPdfManager.prototype.onLoadedStream =
function NetworkPdfManager_getLoadedStream() {
return this.streamManager.onLoadedStream();
};
onLoadedStream: function NetworkPdfManager_onLoadedStream() {
return this.streamManager.onLoadedStream();
},
NetworkPdfManager.prototype.terminate =
function NetworkPdfManager_terminate() {
this.streamManager.abort();
};
terminate: function NetworkPdfManager_terminate() {
this.streamManager.abort();
}
});
return NetworkPdfManager;
})();

4
build/pdf.js

@ -20,8 +20,8 @@ if (typeof PDFJS === 'undefined') { @@ -20,8 +20,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.3.46';
PDFJS.build = '4a82f2f';
PDFJS.version = '1.3.48';
PDFJS.build = '5f56a20';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it

163
build/pdf.worker.js vendored

@ -20,8 +20,8 @@ if (typeof PDFJS === 'undefined') { @@ -20,8 +20,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.3.46';
PDFJS.build = '4a82f2f';
PDFJS.version = '1.3.48';
PDFJS.build = '5f56a20';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
@ -2447,7 +2447,6 @@ var ChunkedStreamManager = (function ChunkedStreamManagerClosure() { @@ -2447,7 +2447,6 @@ var ChunkedStreamManager = (function ChunkedStreamManagerClosure() {
})();
// TODO(mack): Make use of PDFJS.Util.inherit() when it becomes available
var BasePdfManager = (function BasePdfManagerClosure() {
function BasePdfManager() {
throw new Error('Cannot initialize BaseManagerManager');
@ -2474,7 +2473,7 @@ var BasePdfManager = (function BasePdfManagerClosure() { @@ -2474,7 +2473,7 @@ var BasePdfManager = (function BasePdfManagerClosure() {
return this.ensure(this.pdfDocument.catalog, prop, args);
},
getPage: function BasePdfManager_pagePage(pageIndex) {
getPage: function BasePdfManager_getPage(pageIndex) {
return this.pdfDocument.getPage(pageIndex);
},
@ -2486,7 +2485,7 @@ var BasePdfManager = (function BasePdfManagerClosure() { @@ -2486,7 +2485,7 @@ var BasePdfManager = (function BasePdfManagerClosure() {
return new NotImplementedException();
},
requestRange: function BasePdfManager_ensure(begin, end) {
requestRange: function BasePdfManager_requestRange(begin, end) {
return new NotImplementedException();
},
@ -2527,45 +2526,40 @@ var LocalPdfManager = (function LocalPdfManagerClosure() { @@ -2527,45 +2526,40 @@ var LocalPdfManager = (function LocalPdfManagerClosure() {
this._loadedStreamCapability.resolve(stream);
}
LocalPdfManager.prototype = Object.create(BasePdfManager.prototype);
LocalPdfManager.prototype.constructor = LocalPdfManager;
LocalPdfManager.prototype.ensure =
function LocalPdfManager_ensure(obj, prop, args) {
return new Promise(function (resolve, reject) {
try {
var value = obj[prop];
var result;
if (typeof value === 'function') {
result = value.apply(obj, args);
} else {
result = value;
Util.inherit(LocalPdfManager, BasePdfManager, {
ensure: function LocalPdfManager_ensure(obj, prop, args) {
return new Promise(function (resolve, reject) {
try {
var value = obj[prop];
var result;
if (typeof value === 'function') {
result = value.apply(obj, args);
} else {
result = value;
}
resolve(result);
} catch (e) {
reject(e);
}
resolve(result);
} catch (e) {
reject(e);
}
});
};
});
},
LocalPdfManager.prototype.requestRange =
function LocalPdfManager_requestRange(begin, end) {
return Promise.resolve();
};
requestRange: function LocalPdfManager_requestRange(begin, end) {
return Promise.resolve();
},
LocalPdfManager.prototype.requestLoadedStream =
function LocalPdfManager_requestLoadedStream() {
};
requestLoadedStream: function LocalPdfManager_requestLoadedStream() {
return;
},
LocalPdfManager.prototype.onLoadedStream =
function LocalPdfManager_getLoadedStream() {
return this._loadedStreamCapability.promise;
};
onLoadedStream: function LocalPdfManager_onLoadedStream() {
return this._loadedStreamCapability.promise;
},
LocalPdfManager.prototype.terminate =
function LocalPdfManager_terminate() {
return;
};
terminate: function LocalPdfManager_terminate() {
return;
}
});
return LocalPdfManager;
})();
@ -2586,67 +2580,60 @@ var NetworkPdfManager = (function NetworkPdfManagerClosure() { @@ -2586,67 +2580,60 @@ var NetworkPdfManager = (function NetworkPdfManagerClosure() {
this.streamManager = new ChunkedStreamManager(args.length,
args.rangeChunkSize,
args.url, params);
this.pdfDocument = new PDFDocument(this, this.streamManager.getStream(),
args.password);
args.password);
}
NetworkPdfManager.prototype = Object.create(BasePdfManager.prototype);
NetworkPdfManager.prototype.constructor = NetworkPdfManager;
NetworkPdfManager.prototype.ensure =
function NetworkPdfManager_ensure(obj, prop, args) {
var pdfManager = this;
Util.inherit(NetworkPdfManager, BasePdfManager, {
ensure: function NetworkPdfManager_ensure(obj, prop, args) {
var pdfManager = this;
return new Promise(function (resolve, reject) {
function ensureHelper() {
try {
var result;
var value = obj[prop];
if (typeof value === 'function') {
result = value.apply(obj, args);
} else {
result = value;
}
resolve(result);
} catch(e) {
if (!(e instanceof MissingDataException)) {
reject(e);
return;
return new Promise(function (resolve, reject) {
function ensureHelper() {
try {
var result;
var value = obj[prop];
if (typeof value === 'function') {
result = value.apply(obj, args);
} else {
result = value;
}
resolve(result);
} catch(e) {
if (!(e instanceof MissingDataException)) {
reject(e);
return;
}
pdfManager.streamManager.requestRange(e.begin, e.end).
then(ensureHelper, reject);
}
pdfManager.streamManager.requestRange(e.begin, e.end).
then(ensureHelper, reject);
}
}
ensureHelper();
});
};
ensureHelper();
});
},
NetworkPdfManager.prototype.requestRange =
function NetworkPdfManager_requestRange(begin, end) {
return this.streamManager.requestRange(begin, end);
};
requestRange: function NetworkPdfManager_requestRange(begin, end) {
return this.streamManager.requestRange(begin, end);
},
NetworkPdfManager.prototype.requestLoadedStream =
function NetworkPdfManager_requestLoadedStream() {
this.streamManager.requestAllChunks();
};
requestLoadedStream: function NetworkPdfManager_requestLoadedStream() {
this.streamManager.requestAllChunks();
},
NetworkPdfManager.prototype.sendProgressiveData =
function NetworkPdfManager_sendProgressiveData(chunk) {
this.streamManager.onReceiveData({ chunk: chunk });
};
sendProgressiveData:
function NetworkPdfManager_sendProgressiveData(chunk) {
this.streamManager.onReceiveData({ chunk: chunk });
},
NetworkPdfManager.prototype.onLoadedStream =
function NetworkPdfManager_getLoadedStream() {
return this.streamManager.onLoadedStream();
};
onLoadedStream: function NetworkPdfManager_onLoadedStream() {
return this.streamManager.onLoadedStream();
},
NetworkPdfManager.prototype.terminate =
function NetworkPdfManager_terminate() {
this.streamManager.abort();
};
terminate: function NetworkPdfManager_terminate() {
this.streamManager.abort();
}
});
return NetworkPdfManager;
})();

2
package.json

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

Loading…
Cancel
Save