Browse Source

PDF.js version 2.0.354 - See mozilla/pdf.js@b3557483cb19f62c697c2dcf2be41dfd079519f9

master v2.0.354
pdfjsbot 7 years ago
parent
commit
13e4a8d428
  1. 2
      bower.json
  2. 30
      build/pdf.js
  3. 2
      build/pdf.js.map
  4. 2
      build/pdf.min.js
  5. 6
      build/pdf.worker.js
  6. 2
      build/pdf.worker.js.map
  7. 2
      build/pdf.worker.min.js
  8. 2
      lib/core/worker.js
  9. 6
      lib/display/api.js
  10. 6
      lib/display/fetch_stream.js
  11. 4
      lib/display/global.js
  12. 2
      lib/display/network.js
  13. 6
      lib/display/node_stream.js
  14. 2
      lib/display/transport_stream.js
  15. 4
      lib/pdf.js
  16. 4
      lib/pdf.worker.js
  17. 2
      package.json

2
bower.json

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

30
build/pdf.js

@ -3299,7 +3299,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) { if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed')); return Promise.reject(new Error('Worker was destroyed'));
} }
var apiVersion = '2.0.352'; var apiVersion = '2.0.354';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange'); source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch'); source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream'); source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -4698,8 +4698,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}(); }();
var version, build; var version, build;
{ {
exports.version = version = '2.0.352'; exports.version = version = '2.0.354';
exports.build = build = '368a91b5'; exports.build = build = 'b3557483';
} }
exports.getDocument = getDocument; exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort; exports.LoopbackPort = LoopbackPort;
@ -7457,8 +7457,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict"; "use strict";
var pdfjsVersion = '2.0.352'; var pdfjsVersion = '2.0.354';
var pdfjsBuild = '368a91b5'; var pdfjsBuild = 'b3557483';
var pdfjsSharedUtil = __w_pdfjs_require__(0); var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(120); var pdfjsDisplayGlobal = __w_pdfjs_require__(120);
var pdfjsDisplayAPI = __w_pdfjs_require__(58); var pdfjsDisplayAPI = __w_pdfjs_require__(58);
@ -12743,8 +12743,8 @@ if (!_global_scope2.default.PDFJS) {
} }
var PDFJS = _global_scope2.default.PDFJS; var PDFJS = _global_scope2.default.PDFJS;
{ {
PDFJS.version = '2.0.352'; PDFJS.version = '2.0.354';
PDFJS.build = '368a91b5'; PDFJS.build = 'b3557483';
} }
PDFJS.pdfBug = false; PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) { if (PDFJS.verbosity !== undefined) {
@ -15275,8 +15275,8 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() {
this._queuedChunks.push(buffer); this._queuedChunks.push(buffer);
} }
this._pdfDataRangeTransport = pdfDataRangeTransport; this._pdfDataRangeTransport = pdfDataRangeTransport;
this._isRangeSupported = !params.disableRange;
this._isStreamingSupported = !params.disableStream; this._isStreamingSupported = !params.disableStream;
this._isRangeSupported = !params.disableRange;
this._contentLength = params.length; this._contentLength = params.length;
this._fullRequestReader = null; this._fullRequestReader = null;
this._rangeReaders = []; this._rangeReaders = [];
@ -16238,10 +16238,8 @@ var PDFNodeStreamFullReader = function (_BaseFullReader) {
allowRangeRequests = _validateRangeRequest.allowRangeRequests, allowRangeRequests = _validateRangeRequest.allowRangeRequests,
suggestedLength = _validateRangeRequest.suggestedLength; suggestedLength = _validateRangeRequest.suggestedLength;
if (allowRangeRequests) { _this5._isRangeSupported = allowRangeRequests;
_this5._isRangeSupported = true; _this5._contentLength = suggestedLength || _this5._contentLength;
}
_this5._contentLength = suggestedLength;
_this5._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); _this5._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);
}; };
_this5._request = null; _this5._request = null;
@ -16594,13 +16592,13 @@ var PDFFetchStreamReader = function () {
this._withCredentials = source.withCredentials; this._withCredentials = source.withCredentials;
this._contentLength = source.length; this._contentLength = source.length;
this._headersCapability = (0, _util.createPromiseCapability)(); this._headersCapability = (0, _util.createPromiseCapability)();
this._disableRange = source.disableRange; this._disableRange = source.disableRange || false;
this._rangeChunkSize = source.rangeChunkSize; this._rangeChunkSize = source.rangeChunkSize;
if (!this._rangeChunkSize && !this._disableRange) { if (!this._rangeChunkSize && !this._disableRange) {
this._disableRange = true; this._disableRange = true;
} }
this._isRangeSupported = !source.disableRange;
this._isStreamingSupported = !source.disableStream; this._isStreamingSupported = !source.disableStream;
this._isRangeSupported = !source.disableRange;
this._headers = new Headers(); this._headers = new Headers();
for (var property in this._stream.httpHeaders) { for (var property in this._stream.httpHeaders) {
var value = this._stream.httpHeaders[property]; var value = this._stream.httpHeaders[property];
@ -16629,8 +16627,8 @@ var PDFFetchStreamReader = function () {
allowRangeRequests = _validateRangeRequest.allowRangeRequests, allowRangeRequests = _validateRangeRequest.allowRangeRequests,
suggestedLength = _validateRangeRequest.suggestedLength; suggestedLength = _validateRangeRequest.suggestedLength;
_this._contentLength = suggestedLength;
_this._isRangeSupported = allowRangeRequests; _this._isRangeSupported = allowRangeRequests;
_this._contentLength = suggestedLength || _this._contentLength;
_this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); _this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);
if (!_this._isStreamingSupported && _this._isRangeSupported) { if (!_this._isStreamingSupported && _this._isRangeSupported) {
_this.cancel(new _util.AbortException('streaming is disabled')); _this.cancel(new _util.AbortException('streaming is disabled'));
@ -17077,10 +17075,10 @@ PDFNetworkStreamFullRequestReader.prototype = {
allowRangeRequests = _validateRangeRequest.allowRangeRequests, allowRangeRequests = _validateRangeRequest.allowRangeRequests,
suggestedLength = _validateRangeRequest.suggestedLength; suggestedLength = _validateRangeRequest.suggestedLength;
this._contentLength = suggestedLength || this._contentLength;
if (allowRangeRequests) { if (allowRangeRequests) {
this._isRangeSupported = true; this._isRangeSupported = true;
} }
this._contentLength = suggestedLength || this._contentLength;
this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);
var networkManager = this._manager; var networkManager = this._manager;
if (networkManager.isStreamingRequest(fullRequestXhrId)) { if (networkManager.isStreamingRequest(fullRequestXhrId)) {

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

6
build/pdf.worker.js vendored

@ -22295,8 +22295,8 @@ exports.PostScriptCompiler = PostScriptCompiler;
"use strict"; "use strict";
var pdfjsVersion = '2.0.352'; var pdfjsVersion = '2.0.354';
var pdfjsBuild = '368a91b5'; var pdfjsBuild = 'b3557483';
var pdfjsCoreWorker = __w_pdfjs_require__(74); var pdfjsCoreWorker = __w_pdfjs_require__(74);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
@ -22509,7 +22509,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null; var cancelXHRs = null;
var WorkerTasks = []; var WorkerTasks = [];
var apiVersion = docParams.apiVersion; var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.352'; var workerVersion = '2.0.354';
if (apiVersion !== null && apiVersion !== workerVersion) { if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".')); throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
} }

2
build/pdf.worker.js.map vendored

File diff suppressed because one or more lines are too long

2
build/pdf.worker.min.js vendored

File diff suppressed because one or more lines are too long

2
lib/core/worker.js

@ -223,7 +223,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null; var cancelXHRs = null;
var WorkerTasks = []; var WorkerTasks = [];
var apiVersion = docParams.apiVersion; var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.352'; var workerVersion = '2.0.354';
if (apiVersion !== null && apiVersion !== workerVersion) { if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".')); throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
} }

6
lib/display/api.js

@ -178,7 +178,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) { if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed')); return Promise.reject(new Error('Worker was destroyed'));
} }
var apiVersion = '2.0.352'; var apiVersion = '2.0.354';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange'); source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch'); source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream'); source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -1577,8 +1577,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}(); }();
var version, build; var version, build;
{ {
exports.version = version = '2.0.352'; exports.version = version = '2.0.354';
exports.build = build = '368a91b5'; exports.build = build = 'b3557483';
} }
exports.getDocument = getDocument; exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort; exports.LoopbackPort = LoopbackPort;

6
lib/display/fetch_stream.js

@ -99,13 +99,13 @@ var PDFFetchStreamReader = function () {
this._withCredentials = source.withCredentials; this._withCredentials = source.withCredentials;
this._contentLength = source.length; this._contentLength = source.length;
this._headersCapability = (0, _util.createPromiseCapability)(); this._headersCapability = (0, _util.createPromiseCapability)();
this._disableRange = source.disableRange; this._disableRange = source.disableRange || false;
this._rangeChunkSize = source.rangeChunkSize; this._rangeChunkSize = source.rangeChunkSize;
if (!this._rangeChunkSize && !this._disableRange) { if (!this._rangeChunkSize && !this._disableRange) {
this._disableRange = true; this._disableRange = true;
} }
this._isRangeSupported = !source.disableRange;
this._isStreamingSupported = !source.disableStream; this._isStreamingSupported = !source.disableStream;
this._isRangeSupported = !source.disableRange;
this._headers = new Headers(); this._headers = new Headers();
for (var property in this._stream.httpHeaders) { for (var property in this._stream.httpHeaders) {
var value = this._stream.httpHeaders[property]; var value = this._stream.httpHeaders[property];
@ -134,8 +134,8 @@ var PDFFetchStreamReader = function () {
allowRangeRequests = _validateRangeRequest.allowRangeRequests, allowRangeRequests = _validateRangeRequest.allowRangeRequests,
suggestedLength = _validateRangeRequest.suggestedLength; suggestedLength = _validateRangeRequest.suggestedLength;
_this._contentLength = suggestedLength;
_this._isRangeSupported = allowRangeRequests; _this._isRangeSupported = allowRangeRequests;
_this._contentLength = suggestedLength || _this._contentLength;
_this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); _this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);
if (!_this._isStreamingSupported && _this._isRangeSupported) { if (!_this._isStreamingSupported && _this._isRangeSupported) {
_this.cancel(new _util.AbortException('streaming is disabled')); _this.cancel(new _util.AbortException('streaming is disabled'));

4
lib/display/global.js

@ -51,8 +51,8 @@ if (!_global_scope2.default.PDFJS) {
} }
var PDFJS = _global_scope2.default.PDFJS; var PDFJS = _global_scope2.default.PDFJS;
{ {
PDFJS.version = '2.0.352'; PDFJS.version = '2.0.354';
PDFJS.build = '368a91b5'; PDFJS.build = 'b3557483';
} }
PDFJS.pdfBug = false; PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) { if (PDFJS.verbosity !== undefined) {

2
lib/display/network.js

@ -303,10 +303,10 @@ PDFNetworkStreamFullRequestReader.prototype = {
allowRangeRequests = _validateRangeRequest.allowRangeRequests, allowRangeRequests = _validateRangeRequest.allowRangeRequests,
suggestedLength = _validateRangeRequest.suggestedLength; suggestedLength = _validateRangeRequest.suggestedLength;
this._contentLength = suggestedLength || this._contentLength;
if (allowRangeRequests) { if (allowRangeRequests) {
this._isRangeSupported = true; this._isRangeSupported = true;
} }
this._contentLength = suggestedLength || this._contentLength;
this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);
var networkManager = this._manager; var networkManager = this._manager;
if (networkManager.isStreamingRequest(fullRequestXhrId)) { if (networkManager.isStreamingRequest(fullRequestXhrId)) {

6
lib/display/node_stream.js

@ -347,10 +347,8 @@ var PDFNodeStreamFullReader = function (_BaseFullReader) {
allowRangeRequests = _validateRangeRequest.allowRangeRequests, allowRangeRequests = _validateRangeRequest.allowRangeRequests,
suggestedLength = _validateRangeRequest.suggestedLength; suggestedLength = _validateRangeRequest.suggestedLength;
if (allowRangeRequests) { _this5._isRangeSupported = allowRangeRequests;
_this5._isRangeSupported = true; _this5._contentLength = suggestedLength || _this5._contentLength;
}
_this5._contentLength = suggestedLength;
_this5._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); _this5._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);
}; };
_this5._request = null; _this5._request = null;

2
lib/display/transport_stream.js

@ -40,8 +40,8 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() {
this._queuedChunks.push(buffer); this._queuedChunks.push(buffer);
} }
this._pdfDataRangeTransport = pdfDataRangeTransport; this._pdfDataRangeTransport = pdfDataRangeTransport;
this._isRangeSupported = !params.disableRange;
this._isStreamingSupported = !params.disableStream; this._isStreamingSupported = !params.disableStream;
this._isRangeSupported = !params.disableRange;
this._contentLength = params.length; this._contentLength = params.length;
this._fullRequestReader = null; this._fullRequestReader = null;
this._rangeReaders = []; this._rangeReaders = [];

4
lib/pdf.js

@ -21,8 +21,8 @@
*/ */
'use strict'; 'use strict';
var pdfjsVersion = '2.0.352'; var pdfjsVersion = '2.0.354';
var pdfjsBuild = '368a91b5'; var pdfjsBuild = 'b3557483';
var pdfjsSharedUtil = require('./shared/util.js'); var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayGlobal = require('./display/global.js'); var pdfjsDisplayGlobal = require('./display/global.js');
var pdfjsDisplayAPI = require('./display/api.js'); var pdfjsDisplayAPI = require('./display/api.js');

4
lib/pdf.worker.js vendored

@ -21,7 +21,7 @@
*/ */
'use strict'; 'use strict';
var pdfjsVersion = '2.0.352'; var pdfjsVersion = '2.0.354';
var pdfjsBuild = '368a91b5'; var pdfjsBuild = 'b3557483';
var pdfjsCoreWorker = require('./core/worker.js'); var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

2
package.json

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

Loading…
Cancel
Save