Browse Source

PDF.js version 2.0.378 - See mozilla/pdf.js@a89071bdefb90733fc2e671fcca61f6d03964e04

master v2.0.378
pdfjsbot 7 years ago
parent
commit
5da04b12f5
  1. 2
      bower.json
  2. 10
      build/pdf.js
  3. 2
      build/pdf.js.map
  4. 2
      build/pdf.min.js
  5. 10
      build/pdf.worker.js
  6. 2
      build/pdf.worker.js.map
  7. 2
      build/pdf.worker.min.js
  8. 4
      lib/core/jpg.js
  9. 2
      lib/core/worker.js
  10. 6
      lib/display/api.js
  11. 4
      lib/pdf.js
  12. 4
      lib/pdf.worker.js
  13. 20
      lib/test/unit/api_spec.js
  14. 2
      package.json

2
bower.json

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

10
build/pdf.js

@ -3261,7 +3261,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -3261,7 +3261,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed'));
}
var apiVersion = '2.0.376';
var apiVersion = '2.0.378';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -4660,8 +4660,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -4660,8 +4660,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.376';
exports.build = build = '4f5fb782';
exports.version = version = '2.0.378';
exports.build = build = 'a89071bd';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -7423,8 +7423,8 @@ exports.SVGGraphics = SVGGraphics; @@ -7423,8 +7423,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '2.0.376';
var pdfjsBuild = '4f5fb782';
var pdfjsVersion = '2.0.378';
var pdfjsBuild = 'a89071bd';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(120);
var pdfjsDisplayAPI = __w_pdfjs_require__(58);

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

10
build/pdf.worker.js vendored

@ -22313,8 +22313,8 @@ exports.PostScriptCompiler = PostScriptCompiler; @@ -22313,8 +22313,8 @@ exports.PostScriptCompiler = PostScriptCompiler;
"use strict";
var pdfjsVersion = '2.0.376';
var pdfjsBuild = '4f5fb782';
var pdfjsVersion = '2.0.378';
var pdfjsBuild = 'a89071bd';
var pdfjsCoreWorker = __w_pdfjs_require__(74);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
@ -22527,7 +22527,7 @@ var WorkerMessageHandler = { @@ -22527,7 +22527,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.376';
var workerVersion = '2.0.378';
if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
}
@ -31659,7 +31659,7 @@ var JpegImage = function JpegImageClosure() { @@ -31659,7 +31659,7 @@ var JpegImage = function JpegImageClosure() {
data[offset++] = 107.268039397724 + Cb * (2.19927104525741e-5 * Cb - 0.000640992018297945 * Cr + 0.000659397001245577 * Y + 0.000426105652938837 * k - 0.176491792462875) + Cr * (-0.000778269941513683 * Cr + 0.00130872261408275 * Y + 0.000770482631801132 * k - 0.151051492775562) + Y * (0.00126935368114843 * Y - 0.00265090189010898 * k + 0.25802910206845) + k * (-0.000318913117588328 * k - 0.213742400323665);
data[offset++] = -20.810012546947 + Cb * (-0.000570115196973677 * Cb - 2.63409051004589e-5 * Cr + 0.0020741088115012 * Y - 0.00288260236853442 * k + 0.814272968359295) + Cr * (-1.53496057440975e-5 * Cr - 0.000132689043961446 * Y + 0.000560833691242812 * k - 0.195152027534049) + Y * (0.00174418132927582 * Y - 0.00255243321439347 * k + 0.116935020465145) + k * (-0.000343531996510555 * k + 0.24165260232407);
}
return data;
return data.subarray(0, offset);
},
_convertYcckToCmyk: function convertYcckToCmyk(data) {
var Y, Cb, Cr;
@ -31686,7 +31686,7 @@ var JpegImage = function JpegImageClosure() { @@ -31686,7 +31686,7 @@ var JpegImage = function JpegImageClosure() {
data[offset++] = 255 + c * (8.841041422036149 * c + 60.118027045597366 * m + 6.871425592049007 * y + 31.159100130055922 * k - 79.2970844816548) + m * (-15.310361306967817 * m + 17.575251261109482 * y + 131.35250912493976 * k - 190.9453302588951) + y * (4.444339102852739 * y + 9.8632861493405 * k - 24.86741582555878) - k * (20.737325471181034 * k + 187.80453709719578);
data[offset++] = 255 + c * (0.8842522430003296 * c + 8.078677503112928 * m + 30.89978309703729 * y - 0.23883238689178934 * k - 14.183576799673286) + m * (10.49593273432072 * m + 63.02378494754052 * y + 50.606957656360734 * k - 112.23884253719248) + y * (0.03296041114873217 * y + 115.60384449646641 * k - 193.58209356861505) - k * (22.33816807309886 * k + 180.12613974708367);
}
return data;
return data.subarray(0, offset);
},
getData: function getData(width, height, forceRGBoutput) {
if (this.numComponents > 4) {

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

4
lib/core/jpg.js

@ -916,7 +916,7 @@ var JpegImage = function JpegImageClosure() { @@ -916,7 +916,7 @@ var JpegImage = function JpegImageClosure() {
data[offset++] = 107.268039397724 + Cb * (2.19927104525741e-5 * Cb - 0.000640992018297945 * Cr + 0.000659397001245577 * Y + 0.000426105652938837 * k - 0.176491792462875) + Cr * (-0.000778269941513683 * Cr + 0.00130872261408275 * Y + 0.000770482631801132 * k - 0.151051492775562) + Y * (0.00126935368114843 * Y - 0.00265090189010898 * k + 0.25802910206845) + k * (-0.000318913117588328 * k - 0.213742400323665);
data[offset++] = -20.810012546947 + Cb * (-0.000570115196973677 * Cb - 2.63409051004589e-5 * Cr + 0.0020741088115012 * Y - 0.00288260236853442 * k + 0.814272968359295) + Cr * (-1.53496057440975e-5 * Cr - 0.000132689043961446 * Y + 0.000560833691242812 * k - 0.195152027534049) + Y * (0.00174418132927582 * Y - 0.00255243321439347 * k + 0.116935020465145) + k * (-0.000343531996510555 * k + 0.24165260232407);
}
return data;
return data.subarray(0, offset);
},
_convertYcckToCmyk: function convertYcckToCmyk(data) {
var Y, Cb, Cr;
@ -943,7 +943,7 @@ var JpegImage = function JpegImageClosure() { @@ -943,7 +943,7 @@ var JpegImage = function JpegImageClosure() {
data[offset++] = 255 + c * (8.841041422036149 * c + 60.118027045597366 * m + 6.871425592049007 * y + 31.159100130055922 * k - 79.2970844816548) + m * (-15.310361306967817 * m + 17.575251261109482 * y + 131.35250912493976 * k - 190.9453302588951) + y * (4.444339102852739 * y + 9.8632861493405 * k - 24.86741582555878) - k * (20.737325471181034 * k + 187.80453709719578);
data[offset++] = 255 + c * (0.8842522430003296 * c + 8.078677503112928 * m + 30.89978309703729 * y - 0.23883238689178934 * k - 14.183576799673286) + m * (10.49593273432072 * m + 63.02378494754052 * y + 50.606957656360734 * k - 112.23884253719248) + y * (0.03296041114873217 * y + 115.60384449646641 * k - 193.58209356861505) - k * (22.33816807309886 * k + 180.12613974708367);
}
return data;
return data.subarray(0, offset);
},
getData: function getData(width, height, forceRGBoutput) {
if (this.numComponents > 4) {

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.376';
var workerVersion = '2.0.378';
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.376';
var apiVersion = '2.0.378';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -1577,8 +1577,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -1577,8 +1577,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.376';
exports.build = build = '4f5fb782';
exports.version = version = '2.0.378';
exports.build = build = 'a89071bd';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

4
lib/pdf.js

@ -21,8 +21,8 @@ @@ -21,8 +21,8 @@
*/
'use strict';
var pdfjsVersion = '2.0.376';
var pdfjsBuild = '4f5fb782';
var pdfjsVersion = '2.0.378';
var pdfjsBuild = 'a89071bd';
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.376';
var pdfjsBuild = '4f5fb782';
var pdfjsVersion = '2.0.378';
var pdfjsBuild = 'a89071bd';
var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

20
lib/test/unit/api_spec.js

@ -933,6 +933,26 @@ describe('api', function () { @@ -933,6 +933,26 @@ describe('api', function () {
done.fail(reason);
});
});
it('gets operatorList with JPEG image (issue 4888)', function (done) {
var loadingTask = (0, _api.getDocument)((0, _test_utils.buildGetDocumentParams)('cmykjpeg.pdf'));
loadingTask.promise.then(function (pdfDoc) {
pdfDoc.getPage(1).then(function (pdfPage) {
pdfPage.getOperatorList().then(function (opList) {
var imgIndex = opList.fnArray.indexOf(_util.OPS.paintImageXObject);
var imgArgs = opList.argsArray[imgIndex];
var _pdfPage$objs$get = pdfPage.objs.get(imgArgs[0]),
imgData = _pdfPage$objs$get.data;
expect(imgData instanceof Uint8ClampedArray).toEqual(true);
expect(imgData.length).toEqual(90000);
done();
});
});
}).catch(function (reason) {
done.fail(reason);
});
});
it('gets stats after parsing page', function (done) {
var promise = page.getOperatorList().then(function () {
return pdfDocument.getStats();

2
package.json

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

Loading…
Cancel
Save