diff --git a/bower.json b/bower.json index 1ad3a66ba..071cfed5b 100644 --- a/bower.json +++ b/bower.json @@ -14,7 +14,7 @@ "moduleType": ["amd", "globals", "node", "es6"], "keywords": ["pdf"], "dependencies": { - "pako": "^1.0.11" + "fflate": "101arrowz/fflate#^0.4.8" }, "optionalDependencies": { "canvg": "^3.0.6", @@ -65,7 +65,6 @@ "regenerator-runtime": "^0.13.5", "requirejs": "^2.3.6", "rollup": "^2.18.2", - "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-license": "^2.1.0", "rollup-plugin-node-resolve": "4.2.3", "rollup-plugin-preprocess": "0.0.4", diff --git a/modules.conf.js b/modules.conf.js index a62fc82e1..1f60484eb 100644 --- a/modules.conf.js +++ b/modules.conf.js @@ -17,14 +17,7 @@ var configuration = { name: "Core", folder: "", description: "", - deps: ["license", "adler32cs", "rgbcolor"] - }, - - adler32cs: { - name: "Adler32", - folder: "libs", - description: "Adler32", - deps: [] + deps: ["license", "rgbcolor"] }, rgbcolor: { diff --git a/package-lock.json b/package-lock.json index 9255b8509..76a66fb27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2066,6 +2066,14 @@ "dev": true, "requires": { "pako": "~1.0.5" + }, + "dependencies": { + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + } } }, "browserslist": { @@ -3995,6 +4003,11 @@ "pend": "~1.2.0" } }, + "fflate": { + "version": "0.4.8", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.4.8.tgz", + "integrity": "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA==" + }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", @@ -4987,15 +5000,6 @@ "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", "dev": true }, - "is-reference": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", - "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", - "dev": true, - "requires": { - "@types/estree": "*" - } - }, "is-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", @@ -7031,11 +7035,6 @@ "wcwidth": "^1.0.1" } }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" - }, "param-case": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.3.tgz", @@ -7770,27 +7769,6 @@ "fsevents": "~2.1.2" } }, - "rollup-plugin-commonjs": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz", - "integrity": "sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q==", - "dev": true, - "requires": { - "estree-walker": "^0.6.1", - "is-reference": "^1.1.2", - "magic-string": "^0.25.2", - "resolve": "^1.11.0", - "rollup-pluginutils": "^2.8.1" - }, - "dependencies": { - "estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true - } - } - }, "rollup-plugin-license": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-2.1.0.tgz", diff --git a/package.json b/package.json index 7ed57cbdf..05066ebc3 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "dependencies": { "atob": "^2.1.2", "btoa": "^1.2.1", - "pako": "^1.0.11" + "fflate": "^0.4.8" }, "optionalDependencies": { "canvg": "^3.0.6", diff --git a/rollup.config.js b/rollup.config.js index 6777670c8..0d2c5cf97 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -92,7 +92,6 @@ const es = { external: externals, plugins: [ resolve(), - commonjs(), RollupPluginPreprocess({ context: { MODULE_FORMAT: "es" } }), replaceVersion(), licenseBanner() @@ -121,7 +120,6 @@ const node = { external: externals, plugins: [ resolve(), - commonjs(), RollupPluginPreprocess({ context: { MODULE_FORMAT: "cjs" } }), replaceVersion(), licenseBanner() diff --git a/src/index.js b/src/index.js index 5cf2147fe..12e6579e4 100644 --- a/src/index.js +++ b/src/index.js @@ -32,6 +32,5 @@ import "./modules/vfs.js"; import "./libs/bidiEngine.js"; import "./libs/ttffont.js"; -import "./libs/adler32cs.js"; export default jsPDF; diff --git a/src/libs/adler32cs.js b/src/libs/adler32cs.js deleted file mode 100644 index a570674a1..000000000 --- a/src/libs/adler32cs.js +++ /dev/null @@ -1,181 +0,0 @@ -/** - * @license - * Copyright (c) 2012 chick307 - * - * Licensed under the MIT License. - * http://opensource.org/licenses/mit-license - */ - -import { jsPDF } from "../jspdf.js"; - -(function(jsPDF, callback) { - jsPDF.API.adler32cs = callback(); -})(jsPDF, function() { - var _hasArrayBuffer = - typeof ArrayBuffer === "function" && typeof Uint8Array === "function"; - - var _Buffer = null, - _isBuffer = (function() { - if (!_hasArrayBuffer) - return function _isBuffer() { - return false; - }; - - try { - var buffer = {}; - if (typeof buffer.Buffer === "function") _Buffer = buffer.Buffer; - // eslint-disable-next-line no-empty - } catch (error) {} - - return function _isBuffer(value) { - return ( - value instanceof ArrayBuffer || - (_Buffer !== null && value instanceof _Buffer) - ); - }; - })(); - - var _utf8ToBinary = (function() { - if (_Buffer !== null) { - return function _utf8ToBinary(utf8String) { - return new _Buffer(utf8String, "utf8").toString("binary"); - }; - } else { - return function _utf8ToBinary(utf8String) { - return unescape(encodeURIComponent(utf8String)); - }; - } - })(); - - var MOD = 65521; - - var _update = function _update(checksum, binaryString) { - var a = checksum & 0xffff, - b = checksum >>> 16; - for (var i = 0, length = binaryString.length; i < length; i++) { - a = (a + (binaryString.charCodeAt(i) & 0xff)) % MOD; - b = (b + a) % MOD; - } - return ((b << 16) | a) >>> 0; - }; - - var _updateUint8Array = function _updateUint8Array(checksum, uint8Array) { - var a = checksum & 0xffff, - b = checksum >>> 16; - for (var i = 0, length = uint8Array.length; i < length; i++) { - a = (a + uint8Array[i]) % MOD; - b = (b + a) % MOD; - } - return ((b << 16) | a) >>> 0; - }; - - var exports = {}; - - var Adler32 = (exports.Adler32 = (function() { - var ctor = function Adler32(checksum) { - if (!(this instanceof ctor)) { - throw new TypeError("Constructor cannot called be as a function."); - } - if (!isFinite((checksum = checksum === null ? 1 : +checksum))) { - throw new Error("First arguments needs to be a finite number."); - } - this.checksum = checksum >>> 0; - }; - - var proto = (ctor.prototype = {}); - proto.constructor = ctor; - - ctor.from = (function(from) { - from.prototype = proto; - return from; - })(function from(binaryString) { - if (!(this instanceof ctor)) { - throw new TypeError("Constructor cannot called be as a function."); - } - if (binaryString === null) - throw new Error("First argument needs to be a string."); - this.checksum = _update(1, binaryString.toString()); - }); - - ctor.fromUtf8 = (function(fromUtf8) { - fromUtf8.prototype = proto; - return fromUtf8; - })(function fromUtf8(utf8String) { - if (!(this instanceof ctor)) { - throw new TypeError("Constructor cannot called be as a function."); - } - if (utf8String === null) - throw new Error("First argument needs to be a string."); - var binaryString = _utf8ToBinary(utf8String.toString()); - this.checksum = _update(1, binaryString); - }); - - if (_hasArrayBuffer) { - ctor.fromBuffer = (function(fromBuffer) { - fromBuffer.prototype = proto; - return fromBuffer; - })(function fromBuffer(buffer) { - if (!(this instanceof ctor)) { - throw new TypeError("Constructor cannot called be as a function."); - } - if (!_isBuffer(buffer)) - throw new Error("First argument needs to be ArrayBuffer."); - var array = new Uint8Array(buffer); - return (this.checksum = _updateUint8Array(1, array)); - }); - } - - proto.update = function update(binaryString) { - if (binaryString === null) - throw new Error("First argument needs to be a string."); - binaryString = binaryString.toString(); - return (this.checksum = _update(this.checksum, binaryString)); - }; - - proto.updateUtf8 = function updateUtf8(utf8String) { - if (utf8String === null) - throw new Error("First argument needs to be a string."); - var binaryString = _utf8ToBinary(utf8String.toString()); - return (this.checksum = _update(this.checksum, binaryString)); - }; - - if (_hasArrayBuffer) { - proto.updateBuffer = function updateBuffer(buffer) { - if (!_isBuffer(buffer)) - throw new Error("First argument needs to be ArrayBuffer."); - var array = new Uint8Array(buffer); - return (this.checksum = _updateUint8Array(this.checksum, array)); - }; - } - - proto.clone = function clone() { - return new Adler32(this.checksum); - }; - - return ctor; - })()); - - exports.from = function from(binaryString) { - if (binaryString === null) - throw new Error("First argument needs to be a string."); - return _update(1, binaryString.toString()); - }; - - exports.fromUtf8 = function fromUtf8(utf8String) { - if (utf8String === null) - throw new Error("First argument needs to be a string."); - var binaryString = _utf8ToBinary(utf8String.toString()); - return _update(1, binaryString); - }; - - if (_hasArrayBuffer) { - exports.fromBuffer = function fromBuffer(buffer) { - if (!_isBuffer(buffer)) - throw new Error("First argument need to be ArrayBuffer."); - var array = new Uint8Array(buffer); - return _updateUint8Array(1, array); - }; - } - - return exports; -}); diff --git a/src/libs/fflate.js b/src/libs/fflate.js new file mode 100644 index 000000000..c3ba4d7b6 --- /dev/null +++ b/src/libs/fflate.js @@ -0,0 +1,2 @@ +// Tree shaking reduces bundle size +export { zlibSync, unzlibSync } from "fflate"; diff --git a/src/libs/pako.js b/src/libs/pako.js deleted file mode 100644 index 2afa77151..000000000 --- a/src/libs/pako.js +++ /dev/null @@ -1,2 +0,0 @@ -import pako from "pako"; -export default pako; diff --git a/src/libs/png.js b/src/libs/png.js index ee69afb08..807d43127 100644 --- a/src/libs/png.js +++ b/src/libs/png.js @@ -22,7 +22,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -import { FlateStream } from "./zlib.js"; +import { unzlibSync } from "./fflate.js"; import { globalObject } from "./globalObject.js"; var PNG = (function() { @@ -253,8 +253,7 @@ var PNG = (function() { return new Uint8Array(0); } - data = new FlateStream(data); - data = data.getBytes(); + data = unzlibSync(data); function pass(x0, y0, dx, dy) { var abyte, c, diff --git a/src/libs/zlib.js b/src/libs/zlib.js deleted file mode 100644 index 543c6679e..000000000 --- a/src/libs/zlib.js +++ /dev/null @@ -1,1016 +0,0 @@ -/** - * @license - * Extracted from pdf.js - * https://github.com/andreasgal/pdf.js - * - * Copyright (c) 2011 Mozilla Foundation - * - * Contributors: Andreas Gal - * Chris G Jones - * Shaon Barman - * Vivien Nicolas <21@vingtetun.org> - * Justin D'Arcangelo - * Yury Delendik - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -var DecodeStream = (function() { - function constructor() { - this.pos = 0; - this.bufferLength = 0; - this.eof = false; - this.buffer = null; - } - - constructor.prototype = { - ensureBuffer: function decodestream_ensureBuffer(requested) { - var buffer = this.buffer; - var current = buffer ? buffer.byteLength : 0; - if (requested < current) return buffer; - var size = 512; - while (size < requested) size <<= 1; - var buffer2 = new Uint8Array(size); - for (var i = 0; i < current; ++i) buffer2[i] = buffer[i]; - return (this.buffer = buffer2); - }, - getByte: function decodestream_getByte() { - var pos = this.pos; - while (this.bufferLength <= pos) { - if (this.eof) return null; - this.readBlock(); - } - return this.buffer[this.pos++]; - }, - getBytes: function decodestream_getBytes(length) { - var pos = this.pos; - - if (length) { - this.ensureBuffer(pos + length); - var end = pos + length; - - while (!this.eof && this.bufferLength < end) this.readBlock(); - - var bufEnd = this.bufferLength; - if (end > bufEnd) end = bufEnd; - } else { - while (!this.eof) this.readBlock(); - - var end = this.bufferLength; - } - - this.pos = end; - return this.buffer.subarray(pos, end); - }, - lookChar: function decodestream_lookChar() { - var pos = this.pos; - while (this.bufferLength <= pos) { - if (this.eof) return null; - this.readBlock(); - } - return String.fromCharCode(this.buffer[this.pos]); - }, - getChar: function decodestream_getChar() { - var pos = this.pos; - while (this.bufferLength <= pos) { - if (this.eof) return null; - this.readBlock(); - } - return String.fromCharCode(this.buffer[this.pos++]); - }, - makeSubStream: function decodestream_makeSubstream(start, length, dict) { - var end = start + length; - while (this.bufferLength <= end && !this.eof) this.readBlock(); - return new Stream(this.buffer, start, length, dict); - }, - skip: function decodestream_skip(n) { - if (!n) n = 1; - this.pos += n; - }, - reset: function decodestream_reset() { - this.pos = 0; - } - }; - - return constructor; -})(); - -var globalObject = - (typeof self !== "undefined" && self) || - (typeof window !== "undefined" && window) || - (typeof global !== "undefined" && global) || - Function('return typeof this === "object" && this.content')() || - Function("return this")(); - -var FlateStream = (globalObject.FlateStream = (function() { - if (typeof Uint32Array === "undefined") { - return undefined; - } - var codeLenCodeMap = new Uint32Array([ - 16, - 17, - 18, - 0, - 8, - 7, - 9, - 6, - 10, - 5, - 11, - 4, - 12, - 3, - 13, - 2, - 14, - 1, - 15 - ]); - - var lengthDecode = new Uint32Array([ - 0x00003, - 0x00004, - 0x00005, - 0x00006, - 0x00007, - 0x00008, - 0x00009, - 0x0000a, - 0x1000b, - 0x1000d, - 0x1000f, - 0x10011, - 0x20013, - 0x20017, - 0x2001b, - 0x2001f, - 0x30023, - 0x3002b, - 0x30033, - 0x3003b, - 0x40043, - 0x40053, - 0x40063, - 0x40073, - 0x50083, - 0x500a3, - 0x500c3, - 0x500e3, - 0x00102, - 0x00102, - 0x00102 - ]); - - var distDecode = new Uint32Array([ - 0x00001, - 0x00002, - 0x00003, - 0x00004, - 0x10005, - 0x10007, - 0x20009, - 0x2000d, - 0x30011, - 0x30019, - 0x40021, - 0x40031, - 0x50041, - 0x50061, - 0x60081, - 0x600c1, - 0x70101, - 0x70181, - 0x80201, - 0x80301, - 0x90401, - 0x90601, - 0xa0801, - 0xa0c01, - 0xb1001, - 0xb1801, - 0xc2001, - 0xc3001, - 0xd4001, - 0xd6001 - ]); - - var fixedLitCodeTab = [ - new Uint32Array([ - 0x70100, - 0x80050, - 0x80010, - 0x80118, - 0x70110, - 0x80070, - 0x80030, - 0x900c0, - 0x70108, - 0x80060, - 0x80020, - 0x900a0, - 0x80000, - 0x80080, - 0x80040, - 0x900e0, - 0x70104, - 0x80058, - 0x80018, - 0x90090, - 0x70114, - 0x80078, - 0x80038, - 0x900d0, - 0x7010c, - 0x80068, - 0x80028, - 0x900b0, - 0x80008, - 0x80088, - 0x80048, - 0x900f0, - 0x70102, - 0x80054, - 0x80014, - 0x8011c, - 0x70112, - 0x80074, - 0x80034, - 0x900c8, - 0x7010a, - 0x80064, - 0x80024, - 0x900a8, - 0x80004, - 0x80084, - 0x80044, - 0x900e8, - 0x70106, - 0x8005c, - 0x8001c, - 0x90098, - 0x70116, - 0x8007c, - 0x8003c, - 0x900d8, - 0x7010e, - 0x8006c, - 0x8002c, - 0x900b8, - 0x8000c, - 0x8008c, - 0x8004c, - 0x900f8, - 0x70101, - 0x80052, - 0x80012, - 0x8011a, - 0x70111, - 0x80072, - 0x80032, - 0x900c4, - 0x70109, - 0x80062, - 0x80022, - 0x900a4, - 0x80002, - 0x80082, - 0x80042, - 0x900e4, - 0x70105, - 0x8005a, - 0x8001a, - 0x90094, - 0x70115, - 0x8007a, - 0x8003a, - 0x900d4, - 0x7010d, - 0x8006a, - 0x8002a, - 0x900b4, - 0x8000a, - 0x8008a, - 0x8004a, - 0x900f4, - 0x70103, - 0x80056, - 0x80016, - 0x8011e, - 0x70113, - 0x80076, - 0x80036, - 0x900cc, - 0x7010b, - 0x80066, - 0x80026, - 0x900ac, - 0x80006, - 0x80086, - 0x80046, - 0x900ec, - 0x70107, - 0x8005e, - 0x8001e, - 0x9009c, - 0x70117, - 0x8007e, - 0x8003e, - 0x900dc, - 0x7010f, - 0x8006e, - 0x8002e, - 0x900bc, - 0x8000e, - 0x8008e, - 0x8004e, - 0x900fc, - 0x70100, - 0x80051, - 0x80011, - 0x80119, - 0x70110, - 0x80071, - 0x80031, - 0x900c2, - 0x70108, - 0x80061, - 0x80021, - 0x900a2, - 0x80001, - 0x80081, - 0x80041, - 0x900e2, - 0x70104, - 0x80059, - 0x80019, - 0x90092, - 0x70114, - 0x80079, - 0x80039, - 0x900d2, - 0x7010c, - 0x80069, - 0x80029, - 0x900b2, - 0x80009, - 0x80089, - 0x80049, - 0x900f2, - 0x70102, - 0x80055, - 0x80015, - 0x8011d, - 0x70112, - 0x80075, - 0x80035, - 0x900ca, - 0x7010a, - 0x80065, - 0x80025, - 0x900aa, - 0x80005, - 0x80085, - 0x80045, - 0x900ea, - 0x70106, - 0x8005d, - 0x8001d, - 0x9009a, - 0x70116, - 0x8007d, - 0x8003d, - 0x900da, - 0x7010e, - 0x8006d, - 0x8002d, - 0x900ba, - 0x8000d, - 0x8008d, - 0x8004d, - 0x900fa, - 0x70101, - 0x80053, - 0x80013, - 0x8011b, - 0x70111, - 0x80073, - 0x80033, - 0x900c6, - 0x70109, - 0x80063, - 0x80023, - 0x900a6, - 0x80003, - 0x80083, - 0x80043, - 0x900e6, - 0x70105, - 0x8005b, - 0x8001b, - 0x90096, - 0x70115, - 0x8007b, - 0x8003b, - 0x900d6, - 0x7010d, - 0x8006b, - 0x8002b, - 0x900b6, - 0x8000b, - 0x8008b, - 0x8004b, - 0x900f6, - 0x70103, - 0x80057, - 0x80017, - 0x8011f, - 0x70113, - 0x80077, - 0x80037, - 0x900ce, - 0x7010b, - 0x80067, - 0x80027, - 0x900ae, - 0x80007, - 0x80087, - 0x80047, - 0x900ee, - 0x70107, - 0x8005f, - 0x8001f, - 0x9009e, - 0x70117, - 0x8007f, - 0x8003f, - 0x900de, - 0x7010f, - 0x8006f, - 0x8002f, - 0x900be, - 0x8000f, - 0x8008f, - 0x8004f, - 0x900fe, - 0x70100, - 0x80050, - 0x80010, - 0x80118, - 0x70110, - 0x80070, - 0x80030, - 0x900c1, - 0x70108, - 0x80060, - 0x80020, - 0x900a1, - 0x80000, - 0x80080, - 0x80040, - 0x900e1, - 0x70104, - 0x80058, - 0x80018, - 0x90091, - 0x70114, - 0x80078, - 0x80038, - 0x900d1, - 0x7010c, - 0x80068, - 0x80028, - 0x900b1, - 0x80008, - 0x80088, - 0x80048, - 0x900f1, - 0x70102, - 0x80054, - 0x80014, - 0x8011c, - 0x70112, - 0x80074, - 0x80034, - 0x900c9, - 0x7010a, - 0x80064, - 0x80024, - 0x900a9, - 0x80004, - 0x80084, - 0x80044, - 0x900e9, - 0x70106, - 0x8005c, - 0x8001c, - 0x90099, - 0x70116, - 0x8007c, - 0x8003c, - 0x900d9, - 0x7010e, - 0x8006c, - 0x8002c, - 0x900b9, - 0x8000c, - 0x8008c, - 0x8004c, - 0x900f9, - 0x70101, - 0x80052, - 0x80012, - 0x8011a, - 0x70111, - 0x80072, - 0x80032, - 0x900c5, - 0x70109, - 0x80062, - 0x80022, - 0x900a5, - 0x80002, - 0x80082, - 0x80042, - 0x900e5, - 0x70105, - 0x8005a, - 0x8001a, - 0x90095, - 0x70115, - 0x8007a, - 0x8003a, - 0x900d5, - 0x7010d, - 0x8006a, - 0x8002a, - 0x900b5, - 0x8000a, - 0x8008a, - 0x8004a, - 0x900f5, - 0x70103, - 0x80056, - 0x80016, - 0x8011e, - 0x70113, - 0x80076, - 0x80036, - 0x900cd, - 0x7010b, - 0x80066, - 0x80026, - 0x900ad, - 0x80006, - 0x80086, - 0x80046, - 0x900ed, - 0x70107, - 0x8005e, - 0x8001e, - 0x9009d, - 0x70117, - 0x8007e, - 0x8003e, - 0x900dd, - 0x7010f, - 0x8006e, - 0x8002e, - 0x900bd, - 0x8000e, - 0x8008e, - 0x8004e, - 0x900fd, - 0x70100, - 0x80051, - 0x80011, - 0x80119, - 0x70110, - 0x80071, - 0x80031, - 0x900c3, - 0x70108, - 0x80061, - 0x80021, - 0x900a3, - 0x80001, - 0x80081, - 0x80041, - 0x900e3, - 0x70104, - 0x80059, - 0x80019, - 0x90093, - 0x70114, - 0x80079, - 0x80039, - 0x900d3, - 0x7010c, - 0x80069, - 0x80029, - 0x900b3, - 0x80009, - 0x80089, - 0x80049, - 0x900f3, - 0x70102, - 0x80055, - 0x80015, - 0x8011d, - 0x70112, - 0x80075, - 0x80035, - 0x900cb, - 0x7010a, - 0x80065, - 0x80025, - 0x900ab, - 0x80005, - 0x80085, - 0x80045, - 0x900eb, - 0x70106, - 0x8005d, - 0x8001d, - 0x9009b, - 0x70116, - 0x8007d, - 0x8003d, - 0x900db, - 0x7010e, - 0x8006d, - 0x8002d, - 0x900bb, - 0x8000d, - 0x8008d, - 0x8004d, - 0x900fb, - 0x70101, - 0x80053, - 0x80013, - 0x8011b, - 0x70111, - 0x80073, - 0x80033, - 0x900c7, - 0x70109, - 0x80063, - 0x80023, - 0x900a7, - 0x80003, - 0x80083, - 0x80043, - 0x900e7, - 0x70105, - 0x8005b, - 0x8001b, - 0x90097, - 0x70115, - 0x8007b, - 0x8003b, - 0x900d7, - 0x7010d, - 0x8006b, - 0x8002b, - 0x900b7, - 0x8000b, - 0x8008b, - 0x8004b, - 0x900f7, - 0x70103, - 0x80057, - 0x80017, - 0x8011f, - 0x70113, - 0x80077, - 0x80037, - 0x900cf, - 0x7010b, - 0x80067, - 0x80027, - 0x900af, - 0x80007, - 0x80087, - 0x80047, - 0x900ef, - 0x70107, - 0x8005f, - 0x8001f, - 0x9009f, - 0x70117, - 0x8007f, - 0x8003f, - 0x900df, - 0x7010f, - 0x8006f, - 0x8002f, - 0x900bf, - 0x8000f, - 0x8008f, - 0x8004f, - 0x900ff - ]), - 9 - ]; - - var fixedDistCodeTab = [ - new Uint32Array([ - 0x50000, - 0x50010, - 0x50008, - 0x50018, - 0x50004, - 0x50014, - 0x5000c, - 0x5001c, - 0x50002, - 0x50012, - 0x5000a, - 0x5001a, - 0x50006, - 0x50016, - 0x5000e, - 0x00000, - 0x50001, - 0x50011, - 0x50009, - 0x50019, - 0x50005, - 0x50015, - 0x5000d, - 0x5001d, - 0x50003, - 0x50013, - 0x5000b, - 0x5001b, - 0x50007, - 0x50017, - 0x5000f, - 0x00000 - ]), - 5 - ]; - - function error(e) { - throw new Error(e); - } - - function constructor(bytes) { - //var bytes = stream.getBytes(); - var bytesPos = 0; - - var cmf = bytes[bytesPos++]; - var flg = bytes[bytesPos++]; - if (cmf == -1 || flg == -1) error("Invalid header in flate stream"); - if ((cmf & 0x0f) != 0x08) - error("Unknown compression method in flate stream"); - if (((cmf << 8) + flg) % 31 != 0) error("Bad FCHECK in flate stream"); - if (flg & 0x20) error("FDICT bit set in flate stream"); - - this.bytes = bytes; - this.bytesPos = bytesPos; - - this.codeSize = 0; - this.codeBuf = 0; - - DecodeStream.call(this); - } - - constructor.prototype = Object.create(DecodeStream.prototype); - - constructor.prototype.getBits = function(bits) { - var codeSize = this.codeSize; - var codeBuf = this.codeBuf; - var bytes = this.bytes; - var bytesPos = this.bytesPos; - - var b; - while (codeSize < bits) { - if (typeof (b = bytes[bytesPos++]) == "undefined") - error("Bad encoding in flate stream"); - codeBuf |= b << codeSize; - codeSize += 8; - } - b = codeBuf & ((1 << bits) - 1); - this.codeBuf = codeBuf >> bits; - this.codeSize = codeSize -= bits; - this.bytesPos = bytesPos; - return b; - }; - - constructor.prototype.getCode = function(table) { - var codes = table[0]; - var maxLen = table[1]; - var codeSize = this.codeSize; - var codeBuf = this.codeBuf; - var bytes = this.bytes; - var bytesPos = this.bytesPos; - - while (codeSize < maxLen) { - var b; - if (typeof (b = bytes[bytesPos++]) == "undefined") - error("Bad encoding in flate stream"); - codeBuf |= b << codeSize; - codeSize += 8; - } - var code = codes[codeBuf & ((1 << maxLen) - 1)]; - var codeLen = code >> 16; - var codeVal = code & 0xffff; - if (codeSize == 0 || codeSize < codeLen || codeLen == 0) - error("Bad encoding in flate stream"); - this.codeBuf = codeBuf >> codeLen; - this.codeSize = codeSize - codeLen; - this.bytesPos = bytesPos; - return codeVal; - }; - - constructor.prototype.generateHuffmanTable = function(lengths) { - var n = lengths.length; - - // find max code length - var maxLen = 0; - for (var i = 0; i < n; ++i) { - if (lengths[i] > maxLen) maxLen = lengths[i]; - } - - // build the table - var size = 1 << maxLen; - var codes = new Uint32Array(size); - for ( - var len = 1, code = 0, skip = 2; - len <= maxLen; - ++len, code <<= 1, skip <<= 1 - ) { - for (var val = 0; val < n; ++val) { - if (lengths[val] == len) { - // bit-reverse the code - var code2 = 0; - var t = code; - for (var i = 0; i < len; ++i) { - code2 = (code2 << 1) | (t & 1); - t >>= 1; - } - - // fill the table entries - for (var i = code2; i < size; i += skip) codes[i] = (len << 16) | val; - - ++code; - } - } - } - - return [codes, maxLen]; - }; - - constructor.prototype.readBlock = function() { - function repeat(stream, array, len, offset, what) { - var repeat = stream.getBits(len) + offset; - while (repeat-- > 0) array[i++] = what; - } - - // read block header - var hdr = this.getBits(3); - if (hdr & 1) this.eof = true; - hdr >>= 1; - - if (hdr == 0) { - // uncompressed block - var bytes = this.bytes; - var bytesPos = this.bytesPos; - var b; - - if (typeof (b = bytes[bytesPos++]) == "undefined") - error("Bad block header in flate stream"); - var blockLen = b; - if (typeof (b = bytes[bytesPos++]) == "undefined") - error("Bad block header in flate stream"); - blockLen |= b << 8; - if (typeof (b = bytes[bytesPos++]) == "undefined") - error("Bad block header in flate stream"); - var check = b; - if (typeof (b = bytes[bytesPos++]) == "undefined") - error("Bad block header in flate stream"); - check |= b << 8; - if (check != (~blockLen & 0xffff)) - error("Bad uncompressed block length in flate stream"); - - this.codeBuf = 0; - this.codeSize = 0; - - var bufferLength = this.bufferLength; - var buffer = this.ensureBuffer(bufferLength + blockLen); - var end = bufferLength + blockLen; - this.bufferLength = end; - for (var n = bufferLength; n < end; ++n) { - if (typeof (b = bytes[bytesPos++]) == "undefined") { - this.eof = true; - break; - } - buffer[n] = b; - } - this.bytesPos = bytesPos; - return; - } - - var litCodeTable; - var distCodeTable; - if (hdr == 1) { - // compressed block, fixed codes - litCodeTable = fixedLitCodeTab; - distCodeTable = fixedDistCodeTab; - } else if (hdr == 2) { - // compressed block, dynamic codes - var numLitCodes = this.getBits(5) + 257; - var numDistCodes = this.getBits(5) + 1; - var numCodeLenCodes = this.getBits(4) + 4; - - // build the code lengths code table - var codeLenCodeLengths = Array(codeLenCodeMap.length); - var i = 0; - while (i < numCodeLenCodes) - codeLenCodeLengths[codeLenCodeMap[i++]] = this.getBits(3); - var codeLenCodeTab = this.generateHuffmanTable(codeLenCodeLengths); - - // build the literal and distance code tables - var len = 0; - var i = 0; - var codes = numLitCodes + numDistCodes; - var codeLengths = new Array(codes); - while (i < codes) { - var code = this.getCode(codeLenCodeTab); - if (code == 16) { - repeat(this, codeLengths, 2, 3, len); - } else if (code == 17) { - repeat(this, codeLengths, 3, 3, (len = 0)); - } else if (code == 18) { - repeat(this, codeLengths, 7, 11, (len = 0)); - } else { - codeLengths[i++] = len = code; - } - } - - litCodeTable = this.generateHuffmanTable( - codeLengths.slice(0, numLitCodes) - ); - distCodeTable = this.generateHuffmanTable( - codeLengths.slice(numLitCodes, codes) - ); - } else { - error("Unknown block type in flate stream"); - } - - var buffer = this.buffer; - var limit = buffer ? buffer.length : 0; - var pos = this.bufferLength; - while (true) { - var code1 = this.getCode(litCodeTable); - if (code1 < 256) { - if (pos + 1 >= limit) { - buffer = this.ensureBuffer(pos + 1); - limit = buffer.length; - } - buffer[pos++] = code1; - continue; - } - if (code1 == 256) { - this.bufferLength = pos; - return; - } - code1 -= 257; - code1 = lengthDecode[code1]; - var code2 = code1 >> 16; - if (code2 > 0) code2 = this.getBits(code2); - var len = (code1 & 0xffff) + code2; - code1 = this.getCode(distCodeTable); - code1 = distDecode[code1]; - code2 = code1 >> 16; - if (code2 > 0) code2 = this.getBits(code2); - var dist = (code1 & 0xffff) + code2; - if (pos + len >= limit) { - buffer = this.ensureBuffer(pos + len); - limit = buffer.length; - } - for (var k = 0; k < len; ++k, ++pos) buffer[pos] = buffer[pos - dist]; - } - }; - - return constructor; -})()); - -export { DecodeStream, FlateStream }; diff --git a/src/modules/filters.js b/src/modules/filters.js index 9e3c92141..274e7e549 100644 --- a/src/modules/filters.js +++ b/src/modules/filters.js @@ -8,7 +8,7 @@ */ import { jsPDF } from "../jspdf.js"; -import pako from "../libs/pako.js"; +import { zlibSync } from "../libs/fflate.js"; (function(jsPDFAPI) { "use strict"; @@ -134,26 +134,12 @@ import pako from "../libs/pako.js"; */ var FlateEncode = function(data) { - var arr = []; + var arr = new Uint8Array(data.length); var i = data.length; - var adler32; - while (i--) { arr[i] = data.charCodeAt(i); } - adler32 = jsPDFAPI.adler32cs.from(data); - data = pako.deflate(arr); - arr = new Uint8Array(data.byteLength + 4); - arr.set(data, 0); - arr.set( - new Uint8Array([ - adler32 & 0xff, - (adler32 >> 8) & 0xff, - (adler32 >> 16) & 0xff, - (adler32 >> 24) & 0xff - ]), - data.byteLength - ); + arr = zlibSync(arr); data = arr.reduce(function(data, byte) { return data + String.fromCharCode(byte); }, ""); diff --git a/src/modules/png_support.js b/src/modules/png_support.js index 7730a16ba..a09c0b251 100644 --- a/src/modules/png_support.js +++ b/src/modules/png_support.js @@ -25,7 +25,7 @@ */ import { jsPDF } from "../jspdf.js"; -import pako from "../libs/pako.js"; +import { zlibSync } from "../libs/fflate.js"; import { PNG } from "../libs/png.js"; /** @@ -79,15 +79,15 @@ import { PNG } from "../libs/png.js"; }; var hasCompressionJS = function() { - return typeof pako.deflate === "function"; + return typeof zlibSync === "function"; }; var compressBytes = function(bytes, lineLength, colorsPerPixel, compression) { - var level = 5; + var level = 4; var filter_method = filterUp; switch (compression) { case jsPDFAPI.image_compression.FAST: - level = 3; + level = 1; filter_method = filterSub; break; @@ -108,23 +108,8 @@ import { PNG } from "../libs/png.js"; colorsPerPixel, filter_method ); - - var checksum = jsPDF.API.adler32cs.fromBuffer(bytes.buffer); - - var deflater = new pako.Deflate({ level: level }); - deflater.push(bytes, true); - var data = deflater.result; - var len = data.length; - var cmpd = new Uint8Array(data.length + 4); - - cmpd.set(data, 0); - - cmpd[len++] = (checksum >>> 24) & 0xff; - cmpd[len++] = (checksum >>> 16) & 0xff; - cmpd[len++] = (checksum >>> 8) & 0xff; - cmpd[len++] = checksum & 0xff; - - return jsPDFAPI.__addimage__.arrayBufferToBinaryString(cmpd); + var dat = zlibSync(bytes, { level: level }); + return jsPDFAPI.__addimage__.arrayBufferToBinaryString(dat); }; var applyPngFilterMethod = function( diff --git a/test/deployment/esm/karma.conf.js b/test/deployment/esm/karma.conf.js index d3e614113..f98637811 100644 --- a/test/deployment/esm/karma.conf.js +++ b/test/deployment/esm/karma.conf.js @@ -1,6 +1,5 @@ const karmaConfig = require("../../karma.common.conf.js"); const resolve = require("rollup-plugin-node-resolve"); -const commonjs = require("rollup-plugin-commonjs"); module.exports = config => { config.set({ @@ -52,7 +51,7 @@ module.exports = config => { }, rollupPreprocessor: { - plugins: [resolve(), commonjs()], + plugins: [resolve()], output: { format: "iife", name: "jspdf", diff --git a/test/deployment/typescript/karma.conf.js b/test/deployment/typescript/karma.conf.js index 8649554fa..09b99648c 100644 --- a/test/deployment/typescript/karma.conf.js +++ b/test/deployment/typescript/karma.conf.js @@ -1,8 +1,7 @@ const karmaConfig = require("../../karma.common.conf.js"); -const resolve = require("rollup-plugin-node-resolve"); -const commonjs = require("rollup-plugin-commonjs"); const typescript = require("@rollup/plugin-typescript"); const replace = require("@rollup/plugin-replace"); +const resolve = require("rollup-plugin-node-resolve"); module.exports = config => { config.set({ @@ -47,8 +46,7 @@ module.exports = config => { delimiters: ["", ""], '"jspdf"': '"../../../dist/jspdf.es.js"' }), - resolve(), - commonjs() + resolve() ], output: { format: "iife", diff --git a/test/reference/colortype_3_indexed_multi_colour_alpha_8_bit_png.pdf b/test/reference/colortype_3_indexed_multi_colour_alpha_8_bit_png.pdf index fe7d8e293..a19482c37 100644 Binary files a/test/reference/colortype_3_indexed_multi_colour_alpha_8_bit_png.pdf and b/test/reference/colortype_3_indexed_multi_colour_alpha_8_bit_png.pdf differ diff --git a/test/reference/colortype_6_rgba_8_bit_png_FAST.pdf b/test/reference/colortype_6_rgba_8_bit_png_FAST.pdf index f2e4fb289..125ed15a8 100644 Binary files a/test/reference/colortype_6_rgba_8_bit_png_FAST.pdf and b/test/reference/colortype_6_rgba_8_bit_png_FAST.pdf differ diff --git a/test/reference/colortype_6_rgba_8_bit_png_MEDIUM.pdf b/test/reference/colortype_6_rgba_8_bit_png_MEDIUM.pdf index 3a76248af..d957b0eea 100644 Binary files a/test/reference/colortype_6_rgba_8_bit_png_MEDIUM.pdf and b/test/reference/colortype_6_rgba_8_bit_png_MEDIUM.pdf differ diff --git a/test/reference/colortype_6_rgba_8_bit_png_SLOW.pdf b/test/reference/colortype_6_rgba_8_bit_png_SLOW.pdf index 6f37de922..a3e9a12d1 100644 Binary files a/test/reference/colortype_6_rgba_8_bit_png_SLOW.pdf and b/test/reference/colortype_6_rgba_8_bit_png_SLOW.pdf differ diff --git a/test/reference/compress.pdf b/test/reference/compress.pdf index 434cd8b9c..0afb9d98b 100644 Binary files a/test/reference/compress.pdf and b/test/reference/compress.pdf differ diff --git a/test/specs/filters.spec.js b/test/specs/filters.spec.js index 3c01b4ca5..161c29c78 100644 --- a/test/specs/filters.spec.js +++ b/test/specs/filters.spec.js @@ -64,6 +64,6 @@ describe("Module: Filters", () => { "FlateEncode", "ASCIIHexEncode" ]).data - ).toEqual("789cf34dcc53c82c5648c92c2ec9cc4b2fcd2cce484d01004c9c07adad079c4c>"); + ).toEqual("789cf34dcc53c82c5648c92c2ec9cc4b2fcd2cce484d01004c9c07ad>"); }); }); diff --git a/test/specs/jspdf.unit.spec.js b/test/specs/jspdf.unit.spec.js index c89f2f642..cf3a25ae9 100644 --- a/test/specs/jspdf.unit.spec.js +++ b/test/specs/jspdf.unit.spec.js @@ -3031,11 +3031,11 @@ This is a test too.`, var expected = bufferFromString( [ "<<", - "/Length 22", + "/Length 18", "/Filter /FlateDecode", ">>", "stream", - "x\u009C+.)JMÌuI,I\u0004\u0000\u0016Ò\u0004\u0007\u0007\u0004Ò\u0016", + "x\u009C+.)JMÌuI,I\u0004\u0000\u0016Ò\u0004\u0007", "endstream" ].join("\n") ); @@ -3057,7 +3057,7 @@ This is a test too.`, doc.__private__.setCustomOutputDestination(writeArray); doc.__private__.putStream({ data: - "x\u009C+.)JMÌuI,I\u0004\u0000\u0016Ò\u0004\u0007\u0007\u0004Ò\u0016", + "x\u009C+.)JMÌuI,I\u0004\u0000\u0016Ò\u0004\u0007", alreadyAppliedFilters: ["/FlateDecode"] }); expect(bufferFromString(writeArray.join("\n"))).toEqual(expected); diff --git a/test/specs/png.spec.js b/test/specs/png.spec.js index 3bc0e59cc..ca28c3f63 100644 --- a/test/specs/png.spec.js +++ b/test/specs/png.spec.js @@ -51,78 +51,88 @@ describe("Module: PNGSupport", () => { comparePdf(doc.output(), "colortype_6_rgba_8_bit_png_NONE.pdf", "addimage"); }); - it("colortype_6_rgba_8_bit_png_SLOW", () => { - // ASCIIHexEncode so that we can compare it - const doc = new jsPDF({ - orientation: "p", - unit: "pt", - format: "a4", - filters: ["ASCIIHexEncode"], - floatPrecision: 2 + if (typeof isNode === "undefined" || !isNode) { + it("colortype_6_rgba_8_bit_png_SLOW", () => { + // ASCIIHexEncode so that we can compare it + const doc = new jsPDF({ + orientation: "p", + unit: "pt", + format: "a4", + filters: ["ASCIIHexEncode"], + floatPrecision: 2 + }); + doc.addImage( + colortype_6_rgba_8_bit_png, + "PNG", + 100, + 200, + 280, + 210, + undefined, + "SLOW" + ); + + comparePdf( + doc.output(), + "colortype_6_rgba_8_bit_png_SLOW.pdf", + "addimage" + ); }); - doc.addImage( - colortype_6_rgba_8_bit_png, - "PNG", - 100, - 200, - 280, - 210, - undefined, - "SLOW" - ); - - comparePdf(doc.output(), "colortype_6_rgba_8_bit_png_SLOW.pdf", "addimage"); - }); - - it("colortype_6_rgba_8_bit_png_MEDIUM", () => { - // ASCIIHexEncode so that we can compare it - const doc = new jsPDF({ - orientation: "p", - unit: "pt", - format: "a4", - filters: ["ASCIIHexEncode"], - floatPrecision: 2 + } + + if (typeof isNode === "undefined" || !isNode) { + it("colortype_6_rgba_8_bit_png_MEDIUM", () => { + // ASCIIHexEncode so that we can compare it + const doc = new jsPDF({ + orientation: "p", + unit: "pt", + format: "a4", + filters: ["ASCIIHexEncode"], + floatPrecision: 2 + }); + doc.addImage( + colortype_6_rgba_8_bit_png, + "PNG", + 100, + 200, + 280, + 210, + undefined, + "MEDIUM" + ); + + comparePdf( + doc.output(), + "colortype_6_rgba_8_bit_png_MEDIUM.pdf", + "addimage" + ); }); - doc.addImage( - colortype_6_rgba_8_bit_png, - "PNG", - 100, - 200, - 280, - 210, - undefined, - "MEDIUM" - ); - - comparePdf( - doc.output(), - "colortype_6_rgba_8_bit_png_MEDIUM.pdf", - "addimage" - ); - }); - - it("colortype_6_rgba_8_bit_png_FAST", () => { - // ASCIIHexEncode so that we can compare it - const doc = new jsPDF({ - orientation: "p", - unit: "pt", - format: "a4", - filters: ["ASCIIHexEncode"], - floatPrecision: 2 + } + + if (typeof isNode === "undefined" || !isNode) { + it("colortype_6_rgba_8_bit_png_FAST", () => { + // ASCIIHexEncode so that we can compare it + const doc = new jsPDF({ + orientation: "p", + unit: "pt", + format: "a4", + filters: ["ASCIIHexEncode"], + floatPrecision: 2 + }); + doc.addImage( + colortype_6_rgba_8_bit_png, + "PNG", + 100, + 200, + 280, + 210, + undefined, + "FAST" + ); + + comparePdf(doc.output(), "colortype_6_rgba_8_bit_png_FAST.pdf"); }); - doc.addImage( - colortype_6_rgba_8_bit_png, - "PNG", - 100, - 200, - 280, - 210, - undefined, - "FAST" - ); - - comparePdf(doc.output(), "colortype_6_rgba_8_bit_png_FAST.pdf"); - }); + } it("colortype_6_rgba_16_bit_png", () => { var colortype_6_rgba_16_bit_png = @@ -229,32 +239,34 @@ describe("Module: PNGSupport", () => { ); }); - it("colortype_3_indexed_multi_colour_alpha_8_bit_png", () => { - var colortype_3_indexed_multi_colour_alpha_8_bit_png = - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAADSCAMAAACmVC/YAAADAFBMVEUAAABqBgZfAgJUVAUJCX4HB3xGYV4ATQB4CAh9CwtlFRSYExEGYAZjixkNcw2kox6GhRYARwABPQEGVQYJYwkmJs8JbAk6OqBxCglBQaMlJc1RAgIZjxUHB3WCHhkXkhdeDwwrK90xMqUZmhh/CggSVhGGHR1DQ8R2DQwMDJMSEoUQdxAFBWUcHJN8exBFRa0CAVskJNAqKpKoODZuHBx3dxE7lzsanhqFhRgeHs4ICG2qqkUlJNKYmBybmxwhaR5mYwykpCEWhBYZfRNbWAoJCYUeiR5mZQwISQiPOzplumUYihhwcA8dih1+fk8YiBgeHoh5zHmTk0l/KxAgIM8fsB+kpF+YJSVubjEYXBguaC6JiRlCekE4OPZjY61OpU6Hhhm3tyKqqiGMiR1lj2WrqyofuB+5HBlHR/iPj3GysicdcRyO6I6kY2BYhFeFrYWioiQhtCEWFnp2mX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7soqkScQMrTvaHiG9WwG8hJ1JOS7fXnkRxoOCo78HxvMvnhoz04EAAAAAAQ5G+9wgAVAAAAAAAAsAXP/3ConNb92gAAAABJRU5ErkJggg=="; - const doc = new jsPDF({ - orientation: "p", - unit: "pt", - format: "a4", - floatPrecision: 2 + if (typeof isNode === "undefined" || !isNode) { + it("colortype_3_indexed_multi_colour_alpha_8_bit_png", () => { + var colortype_3_indexed_multi_colour_alpha_8_bit_png = + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAADSCAMAAACmVC/YAAADAFBMVEUAAABqBgZfAgJUVAUJCX4HB3xGYV4ATQB4CAh9CwtlFRSYExEGYAZjixkNcw2kox6GhRYARwABPQEGVQYJYwkmJs8JbAk6OqBxCglBQaMlJc1RAgIZjxUHB3WCHhkXkhdeDwwrK90xMqUZmhh/CggSVhGGHR1DQ8R2DQwMDJMSEoUQdxAFBWUcHJN8exBFRa0CAVskJNAqKpKoODZuHBx3dxE7lzsanhqFhRgeHs4ICG2qqkUlJNKYmBybmxwhaR5mYwykpCEWhBYZfRNbWAoJCYUeiR5mZQwISQiPOzplumUYihhwcA8dih1+fk8YiBgeHoh5zHmTk0l/KxAgIM8fsB+kpF+YJSVubjEYXBguaC6JiRlCekE4OPZjY61OpU6Hhhm3tyKqqiGMiR1lj2WrqyofuB+5HBlHR/iPj3GysicdcRyO6I6kY2BYhFeFrYWioiQhtCEWFnp2mXamMjKLVFNXVZgnJ/CZl17bHx2zISF7Li1MqUxFQoq/Ih/EHR4RDZF/EQxJSfm1s0a0Pj5JSfIMCoSgGhoPD5+7GhoEBG9h2GFkMgcnJXBOQQxbW/qKUxeqdCTiIB6bJ2TRHR25Hh6EDgcUgxQbG9S/JCQeHt6OjhkYjRjJGhrpISH///8YlhjvICAnjyc8POQefx2PEArjHx8dqR0ngiYXF8g3N9XcKywQELwaoBqvHBy/ERGfLS0kJcnaGxslJerPMzOSLCspoymwCAgjI7zv7u+XlxyAf3/pMjEkJPgJCacrK9ZU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GH6ThXtPMKx0UdG9Q/+Z8TquFdaSrPuhqiyf/n/Gu5HiXzWLKckHcBaaVaEgJiIyvYjRzCAynt55AP/NVQy69MpioMXanoGZz2JOMAPUmGxuiMHaLv+DfMXsEBkRY4eBg8GNOT1aS03zh9EnvVlMplebspcghkRMjP9A7M/Y2ksxEpLEb6DHg5JXdr5iEJmu5RFDzkUGiSlOAoxMz8IiRI0oI8TQO4CYHE8E0/htb37UBeyG4XwugLhppENmpUSQyID2Jcujknap6m6eL+RKYG1TJNhK3w82hNnHrEUzQ5SxGHQJkdkrPphCMSZgS731b3GwdBeihFFVeXN5yXQpMRyZyYsfjVEt8IItJdPY0bjikEJ0veS6refIJDGjYTBS0pqKD8SEQzgI14ybtIiMB4jDtJCDdRE4Rz75CIGAl78OIO8mTYsJXgSMD11CgawDJdGsxVo7DFb/wV4yDwwfJbt2ERkVAxPEeJECYAVHA45QUDNF1hNmXSb+xNKkzzMFliyfGXgY28D7SYqUd2AW81e7pMPE35eQADGypaINMngvuRfpXiY1M88Sn8RwZEaIcZEZWIzZhhd5/m3VCxHPkhhdSekpVwnkAIyFoF6e6TfBv1CmlBkqnVZG9vQST5Bm4YW1VNnPl6WZ296vxKzwQbQgLlvxMpvZ821uBFqlNeaKtCAum6hRMoNrTqi5yRcADl78WgpbQYmq43biMk3gmtW0UAPI+6USdsJZqerjU72J4XvM7ERN10IOMOIjKREp9XFTJVqpqV4hp7soqkScQMrTvaHiG9WwG8hJ1JOS7fXnkRxoOCo78HxvMvnhoz04EAAAAAAQ5G+9wgAVAAAAAAAAsAXP/3ConNb92gAAAABJRU5ErkJggg=="; + const doc = new jsPDF({ + orientation: "p", + unit: "pt", + format: "a4", + floatPrecision: 2 + }); + doc.addImage( + colortype_3_indexed_multi_colour_alpha_8_bit_png, + "PNG", + 100, + 200, + 280, + 210, + undefined, + undefined + ); + + comparePdf( + doc.output(), + "colortype_3_indexed_multi_colour_alpha_8_bit_png.pdf", + "addimage" + ); }); - doc.addImage( - colortype_3_indexed_multi_colour_alpha_8_bit_png, - "PNG", - 100, - 200, - 280, - 210, - undefined, - undefined - ); - - comparePdf( - doc.output(), - "colortype_3_indexed_multi_colour_alpha_8_bit_png.pdf", - "addimage" - ); - }); + } it("colortype_3_indexed_single_colour_alpha_4_bit_png", () => { var colortype_3_indexed_single_colour_alpha_4_bit_png = diff --git a/test/unit/karma.conf.js b/test/unit/karma.conf.js index 162dd8723..2a65408c2 100644 --- a/test/unit/karma.conf.js +++ b/test/unit/karma.conf.js @@ -2,7 +2,6 @@ "use strict"; const karmaConfig = require("../karma.common.conf.js"); const resolve = require("rollup-plugin-node-resolve"); -const commonjs = require("rollup-plugin-commonjs"); module.exports = config => { config.set({ @@ -32,13 +31,12 @@ module.exports = config => { served: true } ], - preprocessors: { - "src/libs/pako.js": ["rollup"] + "src/libs/fflate.js": ["rollup"] }, rollupPreprocessor: { - plugins: [resolve(), commonjs()], + plugins: [resolve()], output: { format: "es", sourcemap: "inline" @@ -46,7 +44,6 @@ module.exports = config => { }, browsers: ["Chrome", "Firefox"], - // test results reporter to use // possible values: 'dots', 'progress' // available reporters: https://npmjs.org/browse/keyword/karma-reporter