Browse Source

PDF.js version 2.0.303 - See mozilla/pdf.js@55e3f97aa97ad648ef955203524bbdb5593671d1

master v2.0.303
pdfjsbot 7 years ago
parent
commit
d90724150f
  1. 2
      bower.json
  2. 16
      build/pdf.combined.js
  3. 2
      build/pdf.combined.js.map
  4. 14
      build/pdf.js
  5. 2
      build/pdf.js.map
  6. 2
      build/pdf.min.js
  7. 6
      build/pdf.worker.js
  8. 2
      build/pdf.worker.js.map
  9. 2
      build/pdf.worker.min.js
  10. 2
      lib/core/worker.js
  11. 6
      lib/display/api.js
  12. 4
      lib/display/global.js
  13. 4
      lib/pdf.js
  14. 4
      lib/pdf.worker.js
  15. 9
      lib/test/unit/api_spec.js
  16. 39
      lib/test/unit/clitests_helper.js
  17. 6
      lib/test/unit/jasmine-boot.js
  18. 2
      lib/test/unit/test_utils.js
  19. 2
      package.json

2
bower.json

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

16
build/pdf.combined.js

@ -11633,7 +11633,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -11633,7 +11633,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed'));
}
var apiVersion = '2.0.301';
var apiVersion = '2.0.303';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -12928,8 +12928,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -12928,8 +12928,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.301';
exports.build = build = 'fd242ad2';
exports.version = version = '2.0.303';
exports.build = build = '55e3f97a';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -27269,8 +27269,8 @@ exports.SVGGraphics = SVGGraphics; @@ -27269,8 +27269,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '2.0.301';
var pdfjsBuild = 'fd242ad2';
var pdfjsVersion = '2.0.303';
var pdfjsBuild = '55e3f97a';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(133);
var pdfjsDisplayAPI = __w_pdfjs_require__(66);
@ -32473,8 +32473,8 @@ if (!_global_scope2.default.PDFJS) { @@ -32473,8 +32473,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '2.0.301';
PDFJS.build = 'fd242ad2';
PDFJS.version = '2.0.303';
PDFJS.build = '55e3f97a';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
@ -35845,7 +35845,7 @@ var WorkerMessageHandler = { @@ -35845,7 +35845,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.301';
var workerVersion = '2.0.303';
if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
}

2
build/pdf.combined.js.map

File diff suppressed because one or more lines are too long

14
build/pdf.js

@ -3313,7 +3313,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -3313,7 +3313,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed'));
}
var apiVersion = '2.0.301';
var apiVersion = '2.0.303';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -4689,8 +4689,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -4689,8 +4689,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.301';
exports.build = build = 'fd242ad2';
exports.version = version = '2.0.303';
exports.build = build = '55e3f97a';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -7448,8 +7448,8 @@ exports.SVGGraphics = SVGGraphics; @@ -7448,8 +7448,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '2.0.301';
var pdfjsBuild = 'fd242ad2';
var pdfjsVersion = '2.0.303';
var pdfjsBuild = '55e3f97a';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(115);
var pdfjsDisplayAPI = __w_pdfjs_require__(58);
@ -12652,8 +12652,8 @@ if (!_global_scope2.default.PDFJS) { @@ -12652,8 +12652,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '2.0.301';
PDFJS.build = 'fd242ad2';
PDFJS.version = '2.0.303';
PDFJS.build = '55e3f97a';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

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

@ -22498,8 +22498,8 @@ exports.PostScriptCompiler = PostScriptCompiler; @@ -22498,8 +22498,8 @@ exports.PostScriptCompiler = PostScriptCompiler;
"use strict";
var pdfjsVersion = '2.0.301';
var pdfjsBuild = 'fd242ad2';
var pdfjsVersion = '2.0.303';
var pdfjsBuild = '55e3f97a';
var pdfjsCoreWorker = __w_pdfjs_require__(74);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
@ -22712,7 +22712,7 @@ var WorkerMessageHandler = { @@ -22712,7 +22712,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.301';
var workerVersion = '2.0.303';
if (apiVersion !== null && apiVersion !== 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 = { @@ -223,7 +223,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.301';
var workerVersion = '2.0.303';
if (apiVersion !== null && apiVersion !== 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) { @@ -178,7 +178,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed'));
}
var apiVersion = '2.0.301';
var apiVersion = '2.0.303';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -1554,8 +1554,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -1554,8 +1554,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.301';
exports.build = build = 'fd242ad2';
exports.version = version = '2.0.303';
exports.build = build = '55e3f97a';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

4
lib/display/global.js

@ -51,8 +51,8 @@ if (!_global_scope2.default.PDFJS) { @@ -51,8 +51,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '2.0.301';
PDFJS.build = 'fd242ad2';
PDFJS.version = '2.0.303';
PDFJS.build = '55e3f97a';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

4
lib/pdf.js

@ -21,8 +21,8 @@ @@ -21,8 +21,8 @@
*/
'use strict';
var pdfjsVersion = '2.0.301';
var pdfjsBuild = 'fd242ad2';
var pdfjsVersion = '2.0.303';
var pdfjsBuild = '55e3f97a';
var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayGlobal = require('./display/global.js');
var pdfjsDisplayAPI = require('./display/api.js');

4
lib/pdf.worker.js vendored

@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
*/
'use strict';
var pdfjsVersion = '2.0.301';
var pdfjsBuild = 'fd242ad2';
var pdfjsVersion = '2.0.303';
var pdfjsBuild = '55e3f97a';
var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

9
lib/test/unit/api_spec.js

@ -63,9 +63,6 @@ describe('api', function () { @@ -63,9 +63,6 @@ describe('api', function () {
describe('PDFJS', function () {
describe('getDocument', function () {
it('creates pdf doc from URL', function (done) {
if ((0, _is_node2.default)()) {
pending('XMLHttpRequest is not supported in Node.js.');
}
var loadingTask = (0, _api.getDocument)(basicApiGetDocumentParams);
var isProgressReportedResolved = false;
var progressReportedCapability = (0, _util.createPromiseCapability)();
@ -86,9 +83,6 @@ describe('api', function () { @@ -86,9 +83,6 @@ describe('api', function () {
});
});
it('creates pdf doc from URL and aborts before worker initialized', function (done) {
if ((0, _is_node2.default)()) {
pending('XMLHttpRequest is not supported in Node.js.');
}
var loadingTask = (0, _api.getDocument)(basicApiGetDocumentParams);
var destroyed = loadingTask.destroy();
loadingTask.promise.then(function (reason) {
@ -99,9 +93,6 @@ describe('api', function () { @@ -99,9 +93,6 @@ describe('api', function () {
});
});
it('creates pdf doc from URL and aborts loading after worker initialized', function (done) {
if ((0, _is_node2.default)()) {
pending('XMLHttpRequest is not supported in Node.js.');
}
var loadingTask = (0, _api.getDocument)(basicApiGetDocumentParams);
var destroyed = loadingTask._worker.promise.then(function () {
return loadingTask.destroy();

39
lib/test/unit/clitests_helper.js

@ -0,0 +1,39 @@ @@ -0,0 +1,39 @@
/**
* @licstart The following is the entire license notice for the
* Javascript code in this page
*
* Copyright 2017 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @licend The above is the entire license notice for the
* Javascript code in this page
*/
'use strict';
var _is_node = require('../../shared/is_node');
var _is_node2 = _interopRequireDefault(_is_node);
var _node_stream = require('../../display/node_stream');
var _api = require('../../display/api');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
if (!(0, _is_node2.default)()) {
throw new Error('The `gulp unittestcli` command can only be used in ' + 'Node.js environments.');
}
(0, _api.setPDFNetworkStreamFactory)(function (params) {
return new _node_stream.PDFNodeStream(params);
});

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

@ -22,13 +22,17 @@ @@ -22,13 +22,17 @@
'use strict';
function initializePDFJS(callback) {
Promise.all(['pdfjs/display/global', 'pdfjs/display/api', 'pdfjs/display/network', 'pdfjs/display/fetch_stream', 'pdfjs-test/unit/annotation_spec', 'pdfjs-test/unit/api_spec', 'pdfjs-test/unit/bidi_spec', 'pdfjs-test/unit/cff_parser_spec', 'pdfjs-test/unit/cmap_spec', 'pdfjs-test/unit/colorspace_spec', 'pdfjs-test/unit/crypto_spec', 'pdfjs-test/unit/custom_spec', 'pdfjs-test/unit/display_svg_spec', 'pdfjs-test/unit/document_spec', 'pdfjs-test/unit/dom_utils_spec', 'pdfjs-test/unit/encodings_spec', 'pdfjs-test/unit/evaluator_spec', 'pdfjs-test/unit/fonts_spec', 'pdfjs-test/unit/function_spec', 'pdfjs-test/unit/metadata_spec', 'pdfjs-test/unit/murmurhash3_spec', 'pdfjs-test/unit/network_spec', 'pdfjs-test/unit/network_utils_spec', 'pdfjs-test/unit/parser_spec', 'pdfjs-test/unit/pdf_history_spec', 'pdfjs-test/unit/primitives_spec', 'pdfjs-test/unit/stream_spec', 'pdfjs-test/unit/type1_parser_spec', 'pdfjs-test/unit/ui_utils_spec', 'pdfjs-test/unit/unicode_spec', 'pdfjs-test/unit/util_spec', 'pdfjs-test/unit/util_stream_spec'].map(function (moduleName) {
Promise.all(['pdfjs/display/global', 'pdfjs/display/api', 'pdfjs/display/network', 'pdfjs/display/fetch_stream', 'pdfjs/shared/is_node', 'pdfjs-test/unit/annotation_spec', 'pdfjs-test/unit/api_spec', 'pdfjs-test/unit/bidi_spec', 'pdfjs-test/unit/cff_parser_spec', 'pdfjs-test/unit/cmap_spec', 'pdfjs-test/unit/colorspace_spec', 'pdfjs-test/unit/crypto_spec', 'pdfjs-test/unit/custom_spec', 'pdfjs-test/unit/display_svg_spec', 'pdfjs-test/unit/document_spec', 'pdfjs-test/unit/dom_utils_spec', 'pdfjs-test/unit/encodings_spec', 'pdfjs-test/unit/evaluator_spec', 'pdfjs-test/unit/fonts_spec', 'pdfjs-test/unit/function_spec', 'pdfjs-test/unit/metadata_spec', 'pdfjs-test/unit/murmurhash3_spec', 'pdfjs-test/unit/network_spec', 'pdfjs-test/unit/network_utils_spec', 'pdfjs-test/unit/parser_spec', 'pdfjs-test/unit/pdf_history_spec', 'pdfjs-test/unit/primitives_spec', 'pdfjs-test/unit/stream_spec', 'pdfjs-test/unit/type1_parser_spec', 'pdfjs-test/unit/ui_utils_spec', 'pdfjs-test/unit/unicode_spec', 'pdfjs-test/unit/util_spec', 'pdfjs-test/unit/util_stream_spec'].map(function (moduleName) {
return SystemJS.import(moduleName);
})).then(function (modules) {
var displayGlobal = modules[0];
var displayApi = modules[1];
var PDFNetworkStream = modules[2].PDFNetworkStream;
var PDFFetchStream = modules[3].PDFFetchStream;
var isNodeJS = modules[4];
if (isNodeJS()) {
throw new Error('The `gulp unittest` command cannot be used in ' + 'Node.js environments.');
}
if (typeof Response !== 'undefined' && 'body' in Response.prototype && typeof ReadableStream !== 'undefined') {
displayApi.setPDFNetworkStreamFactory(function (params) {
return new PDFFetchStream(params);

2
lib/test/unit/test_utils.js

@ -64,7 +64,7 @@ var TEST_PDFS_PATH = { @@ -64,7 +64,7 @@ var TEST_PDFS_PATH = {
function buildGetDocumentParams(filename, options) {
var params = Object.create(null);
if ((0, _is_node2.default)()) {
params.data = NodeFileReaderFactory.fetch({ path: TEST_PDFS_PATH.node + filename });
params.url = TEST_PDFS_PATH.node + filename;
} else {
params.url = new URL(TEST_PDFS_PATH.dom + filename, window.location).href;
}

2
package.json

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

Loading…
Cancel
Save