Browse Source

PDF.js version 1.9.496 - See mozilla/pdf.js@2656825432cf135b1d8e0a39b4fad0f8eceb2da7

master v1.9.496
pdfjsbot 7 years ago
parent
commit
5a3d188239
  1. 2
      bower.json
  2. 24
      build/pdf.combined.js
  3. 2
      build/pdf.combined.js.map
  4. 24
      build/pdf.js
  5. 2
      build/pdf.js.map
  6. 2
      build/pdf.min.js
  7. 4
      build/pdf.worker.js
  8. 2
      build/pdf.worker.js.map
  9. 4
      lib/display/api.js
  10. 5
      lib/display/fetch_stream.js
  11. 4
      lib/display/global.js
  12. 5
      lib/display/node_stream.js
  13. 6
      lib/pdf.js
  14. 4
      lib/pdf.worker.js
  15. 2
      lib/test/unit/jasmine-boot.js
  16. 2
      package.json

2
bower.json

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

24
build/pdf.combined.js

@ -13745,8 +13745,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -13745,8 +13745,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.493';
exports.build = build = 'bad3203f';
exports.version = version = '1.9.496';
exports.build = build = '26568254';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -29135,8 +29135,8 @@ var PDFFetchStreamReader = function () { @@ -29135,8 +29135,8 @@ var PDFFetchStreamReader = function () {
if (!(0, _network_utils.validateResponseStatus)(response.status, _this._stream.isHttp)) {
throw (0, _network_utils.createResponseStatusError)(response.status, url);
}
_this._headersCapability.resolve();
_this._reader = response.body.getReader();
_this._headersCapability.resolve();
var _validateRangeRequest = (0, _network_utils.validateRangeRequestCapabilities)({
getResponseHeader: function getResponseHeader(name) {
@ -29151,6 +29151,9 @@ var PDFFetchStreamReader = function () { @@ -29151,6 +29151,9 @@ var PDFFetchStreamReader = function () {
_this._contentLength = suggestedLength;
_this._isRangeSupported = allowRangeRequests;
if (!_this._isStreamingSupported && _this._isRangeSupported) {
_this.cancel(new _util.AbortException('streaming is disabled'));
}
}).catch(this._headersCapability.reject);
this.onProgress = null;
}
@ -29336,8 +29339,8 @@ if (!_global_scope2.default.PDFJS) { @@ -29336,8 +29339,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.493';
PDFJS.build = 'bad3203f';
PDFJS.version = '1.9.496';
PDFJS.build = '26568254';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
@ -30091,6 +30094,9 @@ var BaseFullReader = function () { @@ -30091,6 +30094,9 @@ var BaseFullReader = function () {
readableStream.on('error', function (reason) {
_this2._error(reason);
});
if (!this._isStreamingSupported && this._isRangeSupported) {
this._error(new _util.AbortException('streaming is disabled'));
}
if (this._errored) {
this._readableStream.destroy(this._reason);
}
@ -30317,7 +30323,6 @@ var PDFNodeStreamFsFullReader = function (_BaseFullReader2) { @@ -30317,7 +30323,6 @@ var PDFNodeStreamFsFullReader = function (_BaseFullReader2) {
var _this7 = _possibleConstructorReturn(this, (PDFNodeStreamFsFullReader.__proto__ || Object.getPrototypeOf(PDFNodeStreamFsFullReader)).call(this, stream));
_this7._setReadableStream(fs.createReadStream(_this7._url.path));
fs.lstat(_this7._url.path, function (error, stat) {
if (error) {
_this7._errored = true;
@ -30326,6 +30331,7 @@ var PDFNodeStreamFsFullReader = function (_BaseFullReader2) { @@ -30326,6 +30331,7 @@ var PDFNodeStreamFsFullReader = function (_BaseFullReader2) {
return;
}
_this7._contentLength = stat.size;
_this7._setReadableStream(fs.createReadStream(_this7._url.path));
_this7._headersCapability.resolve();
});
return _this7;
@ -50638,8 +50644,8 @@ exports.PDFDataTransportStream = PDFDataTransportStream; @@ -50638,8 +50644,8 @@ exports.PDFDataTransportStream = PDFDataTransportStream;
"use strict";
var pdfjsVersion = '1.9.493';
var pdfjsBuild = 'bad3203f';
var pdfjsVersion = '1.9.496';
var pdfjsBuild = '26568254';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(71);
var pdfjsDisplayAPI = __w_pdfjs_require__(38);
@ -50651,7 +50657,7 @@ var pdfjsDisplaySVG = __w_pdfjs_require__(39); @@ -50651,7 +50657,7 @@ var pdfjsDisplaySVG = __w_pdfjs_require__(39);
if (pdfjsSharedUtil.isNodeJS()) {
var PDFNodeStream = __w_pdfjs_require__(73).PDFNodeStream;
pdfjsDisplayAPI.setPDFNetworkStreamClass(PDFNodeStream);
} else if (typeof Response !== 'undefined' && 'body' in Response.prototype) {
} else if (typeof Response !== 'undefined' && 'body' in Response.prototype && typeof ReadableStream !== 'undefined') {
var PDFFetchStream = __w_pdfjs_require__(70).PDFFetchStream;
pdfjsDisplayAPI.setPDFNetworkStreamClass(PDFFetchStream);
} else {

2
build/pdf.combined.js.map

File diff suppressed because one or more lines are too long

24
build/pdf.js

@ -4472,8 +4472,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -4472,8 +4472,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.493';
exports.build = build = 'bad3203f';
exports.version = version = '1.9.496';
exports.build = build = '26568254';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -6983,8 +6983,8 @@ var PDFFetchStreamReader = function () { @@ -6983,8 +6983,8 @@ var PDFFetchStreamReader = function () {
if (!(0, _network_utils.validateResponseStatus)(response.status, _this._stream.isHttp)) {
throw (0, _network_utils.createResponseStatusError)(response.status, url);
}
_this._headersCapability.resolve();
_this._reader = response.body.getReader();
_this._headersCapability.resolve();
var _validateRangeRequest = (0, _network_utils.validateRangeRequestCapabilities)({
getResponseHeader: function getResponseHeader(name) {
@ -6999,6 +6999,9 @@ var PDFFetchStreamReader = function () { @@ -6999,6 +6999,9 @@ var PDFFetchStreamReader = function () {
_this._contentLength = suggestedLength;
_this._isRangeSupported = allowRangeRequests;
if (!_this._isStreamingSupported && _this._isRangeSupported) {
_this.cancel(new _util.AbortException('streaming is disabled'));
}
}).catch(this._headersCapability.reject);
this.onProgress = null;
}
@ -7184,8 +7187,8 @@ if (!_global_scope2.default.PDFJS) { @@ -7184,8 +7187,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.493';
PDFJS.build = 'bad3203f';
PDFJS.version = '1.9.496';
PDFJS.build = '26568254';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
@ -7939,6 +7942,9 @@ var BaseFullReader = function () { @@ -7939,6 +7942,9 @@ var BaseFullReader = function () {
readableStream.on('error', function (reason) {
_this2._error(reason);
});
if (!this._isStreamingSupported && this._isRangeSupported) {
this._error(new _util.AbortException('streaming is disabled'));
}
if (this._errored) {
this._readableStream.destroy(this._reason);
}
@ -8165,7 +8171,6 @@ var PDFNodeStreamFsFullReader = function (_BaseFullReader2) { @@ -8165,7 +8171,6 @@ var PDFNodeStreamFsFullReader = function (_BaseFullReader2) {
var _this7 = _possibleConstructorReturn(this, (PDFNodeStreamFsFullReader.__proto__ || Object.getPrototypeOf(PDFNodeStreamFsFullReader)).call(this, stream));
_this7._setReadableStream(fs.createReadStream(_this7._url.path));
fs.lstat(_this7._url.path, function (error, stat) {
if (error) {
_this7._errored = true;
@ -8174,6 +8179,7 @@ var PDFNodeStreamFsFullReader = function (_BaseFullReader2) { @@ -8174,6 +8179,7 @@ var PDFNodeStreamFsFullReader = function (_BaseFullReader2) {
return;
}
_this7._contentLength = stat.size;
_this7._setReadableStream(fs.createReadStream(_this7._url.path));
_this7._headersCapability.resolve();
});
return _this7;
@ -15082,8 +15088,8 @@ exports.PDFDataTransportStream = PDFDataTransportStream; @@ -15082,8 +15088,8 @@ exports.PDFDataTransportStream = PDFDataTransportStream;
"use strict";
var pdfjsVersion = '1.9.493';
var pdfjsBuild = 'bad3203f';
var pdfjsVersion = '1.9.496';
var pdfjsBuild = '26568254';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(55);
var pdfjsDisplayAPI = __w_pdfjs_require__(31);
@ -15095,7 +15101,7 @@ var pdfjsDisplaySVG = __w_pdfjs_require__(32); @@ -15095,7 +15101,7 @@ var pdfjsDisplaySVG = __w_pdfjs_require__(32);
if (pdfjsSharedUtil.isNodeJS()) {
var PDFNodeStream = __w_pdfjs_require__(57).PDFNodeStream;
pdfjsDisplayAPI.setPDFNetworkStreamClass(PDFNodeStream);
} else if (typeof Response !== 'undefined' && 'body' in Response.prototype) {
} else if (typeof Response !== 'undefined' && 'body' in Response.prototype && typeof ReadableStream !== 'undefined') {
var PDFFetchStream = __w_pdfjs_require__(54).PDFFetchStream;
pdfjsDisplayAPI.setPDFNetworkStreamClass(PDFFetchStream);
} else {

2
build/pdf.js.map

File diff suppressed because one or more lines are too long

2
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

4
build/pdf.worker.js vendored

@ -42152,8 +42152,8 @@ exports.Type1Parser = Type1Parser; @@ -42152,8 +42152,8 @@ exports.Type1Parser = Type1Parser;
"use strict";
var pdfjsVersion = '1.9.493';
var pdfjsBuild = 'bad3203f';
var pdfjsVersion = '1.9.496';
var pdfjsBuild = '26568254';
var pdfjsCoreWorker = __w_pdfjs_require__(61);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

2
build/pdf.worker.js.map vendored

File diff suppressed because one or more lines are too long

4
lib/display/api.js

@ -1581,8 +1581,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -1581,8 +1581,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.493';
exports.build = build = 'bad3203f';
exports.version = version = '1.9.496';
exports.build = build = '26568254';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

5
lib/display/fetch_stream.js

@ -111,8 +111,8 @@ var PDFFetchStreamReader = function () { @@ -111,8 +111,8 @@ var PDFFetchStreamReader = function () {
if (!(0, _network_utils.validateResponseStatus)(response.status, _this._stream.isHttp)) {
throw (0, _network_utils.createResponseStatusError)(response.status, url);
}
_this._headersCapability.resolve();
_this._reader = response.body.getReader();
_this._headersCapability.resolve();
var _validateRangeRequest = (0, _network_utils.validateRangeRequestCapabilities)({
getResponseHeader: function getResponseHeader(name) {
@ -127,6 +127,9 @@ var PDFFetchStreamReader = function () { @@ -127,6 +127,9 @@ var PDFFetchStreamReader = function () {
_this._contentLength = suggestedLength;
_this._isRangeSupported = allowRangeRequests;
if (!_this._isStreamingSupported && _this._isRangeSupported) {
_this.cancel(new _util.AbortException('streaming is disabled'));
}
}).catch(this._headersCapability.reject);
this.onProgress = null;
}

4
lib/display/global.js

@ -45,8 +45,8 @@ if (!_global_scope2.default.PDFJS) { @@ -45,8 +45,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.493';
PDFJS.build = 'bad3203f';
PDFJS.version = '1.9.496';
PDFJS.build = '26568254';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

5
lib/display/node_stream.js

@ -170,6 +170,9 @@ var BaseFullReader = function () { @@ -170,6 +170,9 @@ var BaseFullReader = function () {
readableStream.on('error', function (reason) {
_this2._error(reason);
});
if (!this._isStreamingSupported && this._isRangeSupported) {
this._error(new _util.AbortException('streaming is disabled'));
}
if (this._errored) {
this._readableStream.destroy(this._reason);
}
@ -396,7 +399,6 @@ var PDFNodeStreamFsFullReader = function (_BaseFullReader2) { @@ -396,7 +399,6 @@ var PDFNodeStreamFsFullReader = function (_BaseFullReader2) {
var _this7 = _possibleConstructorReturn(this, (PDFNodeStreamFsFullReader.__proto__ || Object.getPrototypeOf(PDFNodeStreamFsFullReader)).call(this, stream));
_this7._setReadableStream(fs.createReadStream(_this7._url.path));
fs.lstat(_this7._url.path, function (error, stat) {
if (error) {
_this7._errored = true;
@ -405,6 +407,7 @@ var PDFNodeStreamFsFullReader = function (_BaseFullReader2) { @@ -405,6 +407,7 @@ var PDFNodeStreamFsFullReader = function (_BaseFullReader2) {
return;
}
_this7._contentLength = stat.size;
_this7._setReadableStream(fs.createReadStream(_this7._url.path));
_this7._headersCapability.resolve();
});
return _this7;

6
lib/pdf.js

@ -14,8 +14,8 @@ @@ -14,8 +14,8 @@
*/
'use strict';
var pdfjsVersion = '1.9.493';
var pdfjsBuild = 'bad3203f';
var pdfjsVersion = '1.9.496';
var pdfjsBuild = '26568254';
var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayGlobal = require('./display/global.js');
var pdfjsDisplayAPI = require('./display/api.js');
@ -27,7 +27,7 @@ var pdfjsDisplaySVG = require('./display/svg.js'); @@ -27,7 +27,7 @@ var pdfjsDisplaySVG = require('./display/svg.js');
if (pdfjsSharedUtil.isNodeJS()) {
var PDFNodeStream = require('./display/node_stream.js').PDFNodeStream;
pdfjsDisplayAPI.setPDFNetworkStreamClass(PDFNodeStream);
} else if (typeof Response !== 'undefined' && 'body' in Response.prototype) {
} else if (typeof Response !== 'undefined' && 'body' in Response.prototype && typeof ReadableStream !== 'undefined') {
var PDFFetchStream = require('./display/fetch_stream.js').PDFFetchStream;
pdfjsDisplayAPI.setPDFNetworkStreamClass(PDFFetchStream);
} else {

4
lib/pdf.worker.js vendored

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
*/
'use strict';
var pdfjsVersion = '1.9.493';
var pdfjsBuild = 'bad3203f';
var pdfjsVersion = '1.9.496';
var pdfjsBuild = '26568254';
var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

2
lib/test/unit/jasmine-boot.js

@ -22,7 +22,7 @@ function initializePDFJS(callback) { @@ -22,7 +22,7 @@ function initializePDFJS(callback) {
var displayApi = modules[1];
var PDFNetworkStream = modules[2].PDFNetworkStream;
var PDFFetchStream = modules[3].PDFFetchStream;
if (typeof Response !== 'undefined' && 'body' in Response.prototype) {
if (typeof Response !== 'undefined' && 'body' in Response.prototype && typeof ReadableStream !== 'undefined') {
displayApi.setPDFNetworkStreamClass(PDFFetchStream);
} else {
displayApi.setPDFNetworkStreamClass(PDFNetworkStream);

2
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.9.493",
"version": "1.9.496",
"main": "build/pdf.js",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [

Loading…
Cancel
Save