Browse Source

PDF.js version 2.0.254 - See mozilla/pdf.js@915e3f4c5f5d1e00ff7dce712a5751f091a7712f

master v2.0.254
pdfjsbot 7 years ago
parent
commit
23729f5f78
  1. 2
      bower.json
  2. 27
      build/pdf.combined.js
  3. 2
      build/pdf.combined.js.map
  4. 25
      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. 17
      lib/display/api.js
  12. 4
      lib/display/global.js
  13. 4
      lib/pdf.js
  14. 4
      lib/pdf.worker.js
  15. 10
      lib/test/unit/api_spec.js
  16. 2
      package.json

2
bower.json

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

27
build/pdf.combined.js

@ -11612,7 +11612,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -11612,7 +11612,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed'));
}
var apiVersion = '2.0.252';
var apiVersion = '2.0.254';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -11830,12 +11830,13 @@ var PDFPageProxy = function PDFPageProxyClosure() { @@ -11830,12 +11830,13 @@ var PDFPageProxy = function PDFPageProxyClosure() {
get view() {
return this.pageInfo.view;
},
getViewport: function PDFPageProxy_getViewport(scale, rotate) {
if (arguments.length < 2) {
rotate = this.rotate;
}
return new _util.PageViewport(this.view, scale, rotate, 0, 0);
getViewport: function getViewport(scale) {
var rotate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.rotate;
var dontFlip = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
return new _util.PageViewport(this.view, scale, rotate, 0, 0, dontFlip);
},
getAnnotations: function PDFPageProxy_getAnnotations(params) {
var intent = params && params.intent || null;
if (!this.annotationsPromise || this.annotationsIntent !== intent) {
@ -12903,8 +12904,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -12903,8 +12904,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.252';
exports.build = build = 'a3b2456c';
exports.version = version = '2.0.254';
exports.build = build = '915e3f4c';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -26687,8 +26688,8 @@ exports.SVGGraphics = SVGGraphics; @@ -26687,8 +26688,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '2.0.252';
var pdfjsBuild = 'a3b2456c';
var pdfjsVersion = '2.0.254';
var pdfjsBuild = '915e3f4c';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(131);
var pdfjsDisplayAPI = __w_pdfjs_require__(65);
@ -31867,8 +31868,8 @@ if (!_global_scope2.default.PDFJS) { @@ -31867,8 +31868,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '2.0.252';
PDFJS.build = 'a3b2456c';
PDFJS.version = '2.0.254';
PDFJS.build = '915e3f4c';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
@ -35229,7 +35230,7 @@ var WorkerMessageHandler = { @@ -35229,7 +35230,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.252';
var workerVersion = '2.0.254';
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

25
build/pdf.js

@ -3299,7 +3299,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -3299,7 +3299,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed'));
}
var apiVersion = '2.0.252';
var apiVersion = '2.0.254';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -3517,12 +3517,13 @@ var PDFPageProxy = function PDFPageProxyClosure() { @@ -3517,12 +3517,13 @@ var PDFPageProxy = function PDFPageProxyClosure() {
get view() {
return this.pageInfo.view;
},
getViewport: function PDFPageProxy_getViewport(scale, rotate) {
if (arguments.length < 2) {
rotate = this.rotate;
}
return new _util.PageViewport(this.view, scale, rotate, 0, 0);
getViewport: function getViewport(scale) {
var rotate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.rotate;
var dontFlip = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
return new _util.PageViewport(this.view, scale, rotate, 0, 0, dontFlip);
},
getAnnotations: function PDFPageProxy_getAnnotations(params) {
var intent = params && params.intent || null;
if (!this.annotationsPromise || this.annotationsIntent !== intent) {
@ -4671,8 +4672,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -4671,8 +4672,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.252';
exports.build = build = 'a3b2456c';
exports.version = version = '2.0.254';
exports.build = build = '915e3f4c';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -7416,8 +7417,8 @@ exports.SVGGraphics = SVGGraphics; @@ -7416,8 +7417,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '2.0.252';
var pdfjsBuild = 'a3b2456c';
var pdfjsVersion = '2.0.254';
var pdfjsBuild = '915e3f4c';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(114);
var pdfjsDisplayAPI = __w_pdfjs_require__(57);
@ -12596,8 +12597,8 @@ if (!_global_scope2.default.PDFJS) { @@ -12596,8 +12597,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '2.0.252';
PDFJS.build = 'a3b2456c';
PDFJS.version = '2.0.254';
PDFJS.build = '915e3f4c';
}
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

@ -21939,8 +21939,8 @@ exports.PostScriptCompiler = PostScriptCompiler; @@ -21939,8 +21939,8 @@ exports.PostScriptCompiler = PostScriptCompiler;
"use strict";
var pdfjsVersion = '2.0.252';
var pdfjsBuild = 'a3b2456c';
var pdfjsVersion = '2.0.254';
var pdfjsBuild = '915e3f4c';
var pdfjsCoreWorker = __w_pdfjs_require__(72);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
@ -22147,7 +22147,7 @@ var WorkerMessageHandler = { @@ -22147,7 +22147,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.252';
var workerVersion = '2.0.254';
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

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

17
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.252';
var apiVersion = '2.0.254';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -396,12 +396,13 @@ var PDFPageProxy = function PDFPageProxyClosure() { @@ -396,12 +396,13 @@ var PDFPageProxy = function PDFPageProxyClosure() {
get view() {
return this.pageInfo.view;
},
getViewport: function PDFPageProxy_getViewport(scale, rotate) {
if (arguments.length < 2) {
rotate = this.rotate;
}
return new _util.PageViewport(this.view, scale, rotate, 0, 0);
getViewport: function getViewport(scale) {
var rotate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.rotate;
var dontFlip = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
return new _util.PageViewport(this.view, scale, rotate, 0, 0, dontFlip);
},
getAnnotations: function PDFPageProxy_getAnnotations(params) {
var intent = params && params.intent || null;
if (!this.annotationsPromise || this.annotationsIntent !== intent) {
@ -1550,8 +1551,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -1550,8 +1551,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.252';
exports.build = build = 'a3b2456c';
exports.version = version = '2.0.254';
exports.build = build = '915e3f4c';
}
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.252';
PDFJS.build = 'a3b2456c';
PDFJS.version = '2.0.254';
PDFJS.build = '915e3f4c';
}
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.252';
var pdfjsBuild = 'a3b2456c';
var pdfjsVersion = '2.0.254';
var pdfjsBuild = '915e3f4c';
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.252';
var pdfjsBuild = 'a3b2456c';
var pdfjsVersion = '2.0.254';
var pdfjsBuild = '915e3f4c';
var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

10
lib/test/unit/api_spec.js

@ -843,6 +843,16 @@ describe('api', function () { @@ -843,6 +843,16 @@ describe('api', function () {
expect(viewport.width).toEqual(1262.835);
expect(viewport.height).toEqual(892.92);
});
it('gets viewport respecting "dontFlip" argument', function () {
var scale = 1;
var rotation = 135;
var viewport = page.getViewport(scale, rotation);
var dontFlipViewport = page.getViewport(scale, rotation, true);
expect(dontFlipViewport).not.toEqual(viewport);
expect(dontFlipViewport).toEqual(viewport.clone({ dontFlip: true }));
expect(viewport.transform).toEqual([1, 0, 0, -1, 0, 841.89]);
expect(dontFlipViewport.transform).toEqual([1, 0, -0, 1, 0, 0]);
});
it('gets annotations', function (done) {
var defaultPromise = page.getAnnotations().then(function (data) {
expect(data.length).toEqual(4);

2
package.json

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

Loading…
Cancel
Save