Browse Source

PDF.js version 2.0.455 - See mozilla/pdf.js@6cc0efe1cc31a3b0d502e60ff20a6ed7c578a7e6

master v2.0.455
pdfjsbot 7 years ago
parent
commit
4c5b76408f
  1. 2
      bower.json
  2. 10
      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. 4
      lib/pdf.js
  11. 4
      lib/pdf.worker.js
  12. 37
      lib/test/unit/api_spec.js
  13. 4
      lib/test/unit/evaluator_spec.js
  14. 8
      lib/test/unit/jasmine-boot.js
  15. 4
      lib/web/pdf_viewer.component.js
  16. 4
      package.json
  17. 4
      web/pdf_viewer.js
  18. 2
      web/pdf_viewer.js.map

2
bower.json

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

10
build/pdf.js

@ -3004,8 +3004,8 @@ exports.GlobalWorkerOptions = GlobalWorkerOptions; @@ -3004,8 +3004,8 @@ exports.GlobalWorkerOptions = GlobalWorkerOptions;
"use strict";
var pdfjsVersion = '2.0.453';
var pdfjsBuild = '115fbc47';
var pdfjsVersion = '2.0.455';
var pdfjsBuild = '6cc0efe1';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayAPI = __w_pdfjs_require__(117);
var pdfjsDisplayTextLayer = __w_pdfjs_require__(125);
@ -8436,7 +8436,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -8436,7 +8436,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
}
return worker.messageHandler.sendWithPromise('GetDocRequest', {
docId: docId,
apiVersion: '2.0.453',
apiVersion: '2.0.455',
source: {
data: source.data,
url: source.url,
@ -9867,8 +9867,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -9867,8 +9867,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.453';
exports.build = build = '115fbc47';
exports.version = version = '2.0.455';
exports.build = build = '6cc0efe1';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

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

@ -22361,8 +22361,8 @@ exports.PostScriptCompiler = PostScriptCompiler; @@ -22361,8 +22361,8 @@ exports.PostScriptCompiler = PostScriptCompiler;
"use strict";
var pdfjsVersion = '2.0.453';
var pdfjsBuild = '115fbc47';
var pdfjsVersion = '2.0.455';
var pdfjsBuild = '6cc0efe1';
var pdfjsCoreWorker = __w_pdfjs_require__(74);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
@ -22575,7 +22575,7 @@ var WorkerMessageHandler = { @@ -22575,7 +22575,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.453';
var workerVersion = '2.0.455';
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.453';
var workerVersion = '2.0.455';
if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
}

6
lib/display/api.js

@ -234,7 +234,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -234,7 +234,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
}
return worker.messageHandler.sendWithPromise('GetDocRequest', {
docId: docId,
apiVersion: '2.0.453',
apiVersion: '2.0.455',
source: {
data: source.data,
url: source.url,
@ -1665,8 +1665,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -1665,8 +1665,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.453';
exports.build = build = '115fbc47';
exports.version = version = '2.0.455';
exports.build = build = '6cc0efe1';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

4
lib/pdf.js

@ -21,8 +21,8 @@ @@ -21,8 +21,8 @@
*/
'use strict';
var pdfjsVersion = '2.0.453';
var pdfjsBuild = '115fbc47';
var pdfjsVersion = '2.0.455';
var pdfjsBuild = '6cc0efe1';
var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayAPI = require('./display/api.js');
var pdfjsDisplayTextLayer = require('./display/text_layer.js');

4
lib/pdf.worker.js vendored

@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
*/
'use strict';
var pdfjsVersion = '2.0.453';
var pdfjsBuild = '115fbc47';
var pdfjsVersion = '2.0.455';
var pdfjsBuild = '6cc0efe1';
var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

37
lib/test/unit/api_spec.js

@ -259,10 +259,10 @@ describe('api', function () { @@ -259,10 +259,10 @@ describe('api', function () {
});
});
describe('PDFWorker', function () {
if ((0, _is_node2.default)()) {
pending('Worker is not supported in Node.js.');
}
it('worker created or destroyed', function (done) {
if ((0, _is_node2.default)()) {
pending('Worker is not supported in Node.js.');
}
var worker = new _api.PDFWorker({ name: 'test1' });
worker.promise.then(function () {
expect(worker.name).toEqual('test1');
@ -279,6 +279,9 @@ describe('api', function () { @@ -279,6 +279,9 @@ describe('api', function () {
});
});
it('worker created or destroyed by getDocument', function (done) {
if ((0, _is_node2.default)()) {
pending('Worker is not supported in Node.js.');
}
var loadingTask = (0, _api.getDocument)(basicApiGetDocumentParams);
var worker;
loadingTask.promise.then(function () {
@ -298,6 +301,9 @@ describe('api', function () { @@ -298,6 +301,9 @@ describe('api', function () {
});
});
it('worker created and can be used in getDocument', function (done) {
if ((0, _is_node2.default)()) {
pending('Worker is not supported in Node.js.');
}
var worker = new _api.PDFWorker({ name: 'test1' });
var loadingTask = (0, _api.getDocument)((0, _test_utils.buildGetDocumentParams)(basicApiFileName, { worker: worker }));
loadingTask.promise.then(function () {
@ -318,6 +324,9 @@ describe('api', function () { @@ -318,6 +324,9 @@ describe('api', function () {
});
});
it('creates more than one worker', function (done) {
if ((0, _is_node2.default)()) {
pending('Worker is not supported in Node.js.');
}
var worker1 = new _api.PDFWorker({ name: 'test1' });
var worker2 = new _api.PDFWorker({ name: 'test2' });
var worker3 = new _api.PDFWorker({ name: 'test3' });
@ -333,6 +342,9 @@ describe('api', function () { @@ -333,6 +342,9 @@ describe('api', function () {
});
});
it('gets current workerSrc', function () {
if ((0, _is_node2.default)()) {
pending('Worker is not supported in Node.js.');
}
var workerSrc = _api.PDFWorker.getWorkerSrc();
expect(typeof workerSrc === 'undefined' ? 'undefined' : _typeof(workerSrc)).toEqual('string');
expect(workerSrc).toEqual(_worker_options.GlobalWorkerOptions.workerSrc);
@ -1019,10 +1031,7 @@ describe('api', function () { @@ -1019,10 +1031,7 @@ describe('api', function () {
})]).then(done);
});
});
describe('Multiple PDFJS instances', function () {
if ((0, _is_node2.default)()) {
pending('TODO: Support Canvas testing in Node.js.');
}
describe('Multiple `getDocument` instances', function () {
var pdf1 = (0, _test_utils.buildGetDocumentParams)('tracemonkey.pdf');
var pdf2 = (0, _test_utils.buildGetDocumentParams)('TAMReview.pdf');
var pdf3 = (0, _test_utils.buildGetDocumentParams)('issue6068.pdf');
@ -1059,6 +1068,9 @@ describe('api', function () { @@ -1059,6 +1068,9 @@ describe('api', function () {
});
});
it('should correctly render PDFs in parallel', function (done) {
if ((0, _is_node2.default)()) {
pending('TODO: Support Canvas testing in Node.js.');
}
var baseline1, baseline2, baseline3;
var promiseDone = renderPDF(pdf1).then(function (data1) {
baseline1 = data1;
@ -1083,12 +1095,9 @@ describe('api', function () { @@ -1083,12 +1095,9 @@ describe('api', function () {
});
});
describe('PDFDataRangeTransport', function () {
if ((0, _is_node2.default)()) {
pending('XMLHttpRequest is not supported in Node.js.');
}
var pdfPath = new URL('../pdfs/tracemonkey.pdf', window.location).href;
var loadPromise;
function getDocumentData() {
var pdfPath = new URL('../pdfs/tracemonkey.pdf', window.location).href;
if (loadPromise) {
return loadPromise;
}
@ -1107,6 +1116,9 @@ describe('api', function () { @@ -1107,6 +1116,9 @@ describe('api', function () {
return loadPromise;
}
it('should fetch document info and page using ranges', function (done) {
if ((0, _is_node2.default)()) {
pending('XMLHttpRequest is not supported in Node.js.');
}
var transport;
var initialDataLength = 4000;
var fetches = 0;
@ -1139,6 +1151,9 @@ describe('api', function () { @@ -1139,6 +1151,9 @@ describe('api', function () {
});
});
it('should fetch document info and page using range and streaming', function (done) {
if ((0, _is_node2.default)()) {
pending('XMLHttpRequest is not supported in Node.js.');
}
var transport;
var initialDataLength = 4000;
var fetches = 0;

4
lib/test/unit/evaluator_spec.js

@ -92,7 +92,7 @@ describe('evaluator', function () { @@ -92,7 +92,7 @@ describe('evaluator', function () {
done();
});
});
it('should handle one operations', function (done) {
it('should handle one operation', function (done) {
var stream = new _stream.StringStream('Q');
runOperatorListCheck(partialEvaluator, stream, new ResourcesMock(), function (result) {
expect(!!result.fnArray && !!result.argsArray).toEqual(true);
@ -113,7 +113,7 @@ describe('evaluator', function () { @@ -113,7 +113,7 @@ describe('evaluator', function () {
done();
});
});
it('should handle tree glued operations', function (done) {
it('should handle three glued operations', function (done) {
var stream = new _stream.StringStream('fff');
runOperatorListCheck(partialEvaluator, stream, new ResourcesMock(), function (result) {
expect(!!result.fnArray && !!result.argsArray).toEqual(true);

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

@ -57,8 +57,8 @@ function initializePDFJS(callback) { @@ -57,8 +57,8 @@ function initializePDFJS(callback) {
return window.location;
}
});
var catchingExceptions = queryString.getParam('catch');
env.catchExceptions(typeof catchingExceptions === 'undefined' ? true : catchingExceptions);
var stoppingOnSpecFailure = queryString.getParam('failFast');
env.stopOnSpecFailure(typeof stoppingOnSpecFailure === 'undefined' ? false : stoppingOnSpecFailure);
var throwingExpectationFailures = queryString.getParam('throwFailures');
env.throwOnExpectationFailure(throwingExpectationFailures);
var random = queryString.getParam('random');
@ -69,8 +69,8 @@ function initializePDFJS(callback) { @@ -69,8 +69,8 @@ function initializePDFJS(callback) {
}
var htmlReporter = new jasmine.HtmlReporter({
env: env,
onRaiseExceptionsClick: function onRaiseExceptionsClick() {
queryString.navigateWithNewParam('catch', !env.catchingExceptions());
onStopExecutionClick: function onStopExecutionClick() {
queryString.navigateWithNewParam('failFast', env.stoppingOnSpecFailure());
},
onThrowExpectationsClick: function onThrowExpectationsClick() {
queryString.navigateWithNewParam('throwFailures', !env.throwingExpectationFailures());

4
lib/web/pdf_viewer.component.js

@ -48,8 +48,8 @@ var _pdf_single_page_viewer = require('./pdf_single_page_viewer'); @@ -48,8 +48,8 @@ var _pdf_single_page_viewer = require('./pdf_single_page_viewer');
var _pdf_viewer = require('./pdf_viewer.js');
var pdfjsVersion = '2.0.453';
var pdfjsBuild = '115fbc47';
var pdfjsVersion = '2.0.455';
var pdfjsBuild = '6cc0efe1';
exports.PDFViewer = _pdf_viewer.PDFViewer;
exports.PDFSinglePageViewer = _pdf_single_page_viewer.PDFSinglePageViewer;
exports.PDFPageView = _pdf_page_view.PDFPageView;

4
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "2.0.453",
"version": "2.0.455",
"main": "build/pdf.js",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [
@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
"license": "Apache-2.0",
"dependencies": {
"node-ensure": "^0.0.0",
"worker-loader": "^1.1.0"
"worker-loader": "^1.1.1"
},
"peerDependencies": {
"webpack": "^2.0.0 || ^3.0.0"

4
web/pdf_viewer.js

@ -3179,8 +3179,8 @@ var _pdf_single_page_viewer = __w_pdfjs_require__(16); @@ -3179,8 +3179,8 @@ var _pdf_single_page_viewer = __w_pdfjs_require__(16);
var _pdf_viewer = __w_pdfjs_require__(17);
var pdfjsVersion = '2.0.453';
var pdfjsBuild = '115fbc47';
var pdfjsVersion = '2.0.455';
var pdfjsBuild = '6cc0efe1';
exports.PDFViewer = _pdf_viewer.PDFViewer;
exports.PDFSinglePageViewer = _pdf_single_page_viewer.PDFSinglePageViewer;
exports.PDFPageView = _pdf_page_view.PDFPageView;

2
web/pdf_viewer.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save