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 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.3.46", "version": "1.3.48",
"main": [ "main": [
"build/pdf.js", "build/pdf.js",
"build/pdf.worker.js" "build/pdf.worker.js"

163
build/pdf.combined.js

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

4
build/pdf.js

@ -20,8 +20,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.3.46'; PDFJS.version = '1.3.48';
PDFJS.build = '4a82f2f'; PDFJS.build = '5f56a20';
(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

163
build/pdf.worker.js vendored

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

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.3.46", "version": "1.3.48",
"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