pdfmake 0.1.64 → 0.1.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/pdfmake.js +108 -141
- package/build/pdfmake.js.map +1 -1
- package/build/pdfmake.min.js +5 -5
- package/build/pdfmake.min.js.map +1 -1
- package/package.json +69 -69
- package/src/docMeasure.js +6 -1
- package/src/layoutBuilder.js +24 -28
- package/src/printer.js +18 -6
- package/src/styleContextStack.js +1 -0
- package/src/tableProcessor.js +7 -1
package/build/pdfmake.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! pdfmake v0.1.
|
|
1
|
+
/*! pdfmake v0.1.65, @license MIT, @link http://pdfmake.org */
|
|
2
2
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
3
3
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
4
4
|
module.exports = factory();
|
|
@@ -4396,7 +4396,7 @@ var objectKeys = Object.keys || function (obj) {
|
|
|
4396
4396
|
module.exports = Duplex;
|
|
4397
4397
|
|
|
4398
4398
|
/*<replacement>*/
|
|
4399
|
-
var util = __webpack_require__(56);
|
|
4399
|
+
var util = Object.create(__webpack_require__(56));
|
|
4400
4400
|
util.inherits = __webpack_require__(46);
|
|
4401
4401
|
/*</replacement>*/
|
|
4402
4402
|
|
|
@@ -5889,6 +5889,12 @@ EventEmitter.prototype._maxListeners = undefined;
|
|
|
5889
5889
|
// added to it. This is a useful default which helps finding memory leaks.
|
|
5890
5890
|
var defaultMaxListeners = 10;
|
|
5891
5891
|
|
|
5892
|
+
function checkListener(listener) {
|
|
5893
|
+
if (typeof listener !== 'function') {
|
|
5894
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
5895
|
+
}
|
|
5896
|
+
}
|
|
5897
|
+
|
|
5892
5898
|
Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
|
|
5893
5899
|
enumerable: true,
|
|
5894
5900
|
get: function() {
|
|
@@ -5923,14 +5929,14 @@ EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
|
|
5923
5929
|
return this;
|
|
5924
5930
|
};
|
|
5925
5931
|
|
|
5926
|
-
function
|
|
5932
|
+
function _getMaxListeners(that) {
|
|
5927
5933
|
if (that._maxListeners === undefined)
|
|
5928
5934
|
return EventEmitter.defaultMaxListeners;
|
|
5929
5935
|
return that._maxListeners;
|
|
5930
5936
|
}
|
|
5931
5937
|
|
|
5932
5938
|
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
|
5933
|
-
return
|
|
5939
|
+
return _getMaxListeners(this);
|
|
5934
5940
|
};
|
|
5935
5941
|
|
|
5936
5942
|
EventEmitter.prototype.emit = function emit(type) {
|
|
@@ -5982,9 +5988,7 @@ function _addListener(target, type, listener, prepend) {
|
|
|
5982
5988
|
var events;
|
|
5983
5989
|
var existing;
|
|
5984
5990
|
|
|
5985
|
-
|
|
5986
|
-
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
5987
|
-
}
|
|
5991
|
+
checkListener(listener);
|
|
5988
5992
|
|
|
5989
5993
|
events = target._events;
|
|
5990
5994
|
if (events === undefined) {
|
|
@@ -6021,7 +6025,7 @@ function _addListener(target, type, listener, prepend) {
|
|
|
6021
6025
|
}
|
|
6022
6026
|
|
|
6023
6027
|
// Check for listener leak
|
|
6024
|
-
m =
|
|
6028
|
+
m = _getMaxListeners(target);
|
|
6025
6029
|
if (m > 0 && existing.length > m && !existing.warned) {
|
|
6026
6030
|
existing.warned = true;
|
|
6027
6031
|
// No error code for this since it is a Warning
|
|
@@ -6053,12 +6057,12 @@ EventEmitter.prototype.prependListener =
|
|
|
6053
6057
|
};
|
|
6054
6058
|
|
|
6055
6059
|
function onceWrapper() {
|
|
6056
|
-
var args = [];
|
|
6057
|
-
for (var i = 0; i < arguments.length; i++) args.push(arguments[i]);
|
|
6058
6060
|
if (!this.fired) {
|
|
6059
6061
|
this.target.removeListener(this.type, this.wrapFn);
|
|
6060
6062
|
this.fired = true;
|
|
6061
|
-
|
|
6063
|
+
if (arguments.length === 0)
|
|
6064
|
+
return this.listener.call(this.target);
|
|
6065
|
+
return this.listener.apply(this.target, arguments);
|
|
6062
6066
|
}
|
|
6063
6067
|
}
|
|
6064
6068
|
|
|
@@ -6071,18 +6075,14 @@ function _onceWrap(target, type, listener) {
|
|
|
6071
6075
|
}
|
|
6072
6076
|
|
|
6073
6077
|
EventEmitter.prototype.once = function once(type, listener) {
|
|
6074
|
-
|
|
6075
|
-
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
6076
|
-
}
|
|
6078
|
+
checkListener(listener);
|
|
6077
6079
|
this.on(type, _onceWrap(this, type, listener));
|
|
6078
6080
|
return this;
|
|
6079
6081
|
};
|
|
6080
6082
|
|
|
6081
6083
|
EventEmitter.prototype.prependOnceListener =
|
|
6082
6084
|
function prependOnceListener(type, listener) {
|
|
6083
|
-
|
|
6084
|
-
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
6085
|
-
}
|
|
6085
|
+
checkListener(listener);
|
|
6086
6086
|
this.prependListener(type, _onceWrap(this, type, listener));
|
|
6087
6087
|
return this;
|
|
6088
6088
|
};
|
|
@@ -6092,9 +6092,7 @@ EventEmitter.prototype.removeListener =
|
|
|
6092
6092
|
function removeListener(type, listener) {
|
|
6093
6093
|
var list, events, position, i, originalListener;
|
|
6094
6094
|
|
|
6095
|
-
|
|
6096
|
-
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
6097
|
-
}
|
|
6095
|
+
checkListener(listener);
|
|
6098
6096
|
|
|
6099
6097
|
events = this._events;
|
|
6100
6098
|
if (events === undefined)
|
|
@@ -8153,7 +8151,7 @@ var Duplex;
|
|
|
8153
8151
|
Writable.WritableState = WritableState;
|
|
8154
8152
|
|
|
8155
8153
|
/*<replacement>*/
|
|
8156
|
-
var util = __webpack_require__(56);
|
|
8154
|
+
var util = Object.create(__webpack_require__(56));
|
|
8157
8155
|
util.inherits = __webpack_require__(46);
|
|
8158
8156
|
/*</replacement>*/
|
|
8159
8157
|
|
|
@@ -12931,7 +12929,7 @@ function _isUint8Array(obj) {
|
|
|
12931
12929
|
/*</replacement>*/
|
|
12932
12930
|
|
|
12933
12931
|
/*<replacement>*/
|
|
12934
|
-
var util = __webpack_require__(56);
|
|
12932
|
+
var util = Object.create(__webpack_require__(56));
|
|
12935
12933
|
util.inherits = __webpack_require__(46);
|
|
12936
12934
|
/*</replacement>*/
|
|
12937
12935
|
|
|
@@ -14048,7 +14046,7 @@ module.exports = Transform;
|
|
|
14048
14046
|
var Duplex = __webpack_require__(32);
|
|
14049
14047
|
|
|
14050
14048
|
/*<replacement>*/
|
|
14051
|
-
var util = __webpack_require__(56);
|
|
14049
|
+
var util = Object.create(__webpack_require__(56));
|
|
14052
14050
|
util.inherits = __webpack_require__(46);
|
|
14053
14051
|
/*</replacement>*/
|
|
14054
14052
|
|
|
@@ -18101,9 +18099,7 @@ var Break = function Break(position, required) {
|
|
|
18101
18099
|
|
|
18102
18100
|
;
|
|
18103
18101
|
|
|
18104
|
-
var LineBreaker =
|
|
18105
|
-
/*#__PURE__*/
|
|
18106
|
-
function () {
|
|
18102
|
+
var LineBreaker = /*#__PURE__*/function () {
|
|
18107
18103
|
function LineBreaker(string) {
|
|
18108
18104
|
this.string = string;
|
|
18109
18105
|
this.pos = 0;
|
|
@@ -18389,6 +18385,7 @@ StyleContextStack.prototype.autopush = function (item) {
|
|
|
18389
18385
|
'color',
|
|
18390
18386
|
'columnGap',
|
|
18391
18387
|
'fillColor',
|
|
18388
|
+
'fillOpacity',
|
|
18392
18389
|
'decoration',
|
|
18393
18390
|
'decorationStyle',
|
|
18394
18391
|
'decorationColor',
|
|
@@ -19877,7 +19874,8 @@ function renderLine(line, x, y, pdfKitDoc) {
|
|
|
19877
19874
|
options.features = inline.fontFeatures;
|
|
19878
19875
|
}
|
|
19879
19876
|
|
|
19880
|
-
|
|
19877
|
+
var opacity = isNumber(inline.opacity) ? inline.opacity : 1;
|
|
19878
|
+
pdfKitDoc.opacity(opacity);
|
|
19881
19879
|
pdfKitDoc.fill(inline.color || 'black');
|
|
19882
19880
|
|
|
19883
19881
|
pdfKitDoc._font = inline.font;
|
|
@@ -19989,25 +19987,36 @@ function renderVector(vector, pdfKitDoc) {
|
|
|
19989
19987
|
vector.color = gradient;
|
|
19990
19988
|
}
|
|
19991
19989
|
|
|
19990
|
+
var fillOpacity = isNumber(vector.fillOpacity) ? vector.fillOpacity : 1;
|
|
19991
|
+
var strokeOpacity = isNumber(vector.strokeOpacity) ? vector.strokeOpacity : 1;
|
|
19992
|
+
|
|
19992
19993
|
if (vector.color && vector.lineColor) {
|
|
19993
|
-
pdfKitDoc.fillColor(vector.color,
|
|
19994
|
-
pdfKitDoc.strokeColor(vector.lineColor,
|
|
19994
|
+
pdfKitDoc.fillColor(vector.color, fillOpacity);
|
|
19995
|
+
pdfKitDoc.strokeColor(vector.lineColor, strokeOpacity);
|
|
19995
19996
|
pdfKitDoc.fillAndStroke();
|
|
19996
19997
|
} else if (vector.color) {
|
|
19997
|
-
pdfKitDoc.fillColor(vector.color,
|
|
19998
|
+
pdfKitDoc.fillColor(vector.color, fillOpacity);
|
|
19998
19999
|
pdfKitDoc.fill();
|
|
19999
20000
|
} else {
|
|
20000
|
-
pdfKitDoc.strokeColor(vector.lineColor || 'black',
|
|
20001
|
+
pdfKitDoc.strokeColor(vector.lineColor || 'black', strokeOpacity);
|
|
20001
20002
|
pdfKitDoc.stroke();
|
|
20002
20003
|
}
|
|
20003
20004
|
}
|
|
20004
20005
|
|
|
20005
20006
|
function renderImage(image, x, y, pdfKitDoc) {
|
|
20006
|
-
|
|
20007
|
+
var opacity = isNumber(image.opacity) ? image.opacity : 1;
|
|
20008
|
+
pdfKitDoc.opacity(opacity);
|
|
20007
20009
|
pdfKitDoc.image(image.image, image.x, image.y, { width: image._width, height: image._height });
|
|
20008
20010
|
if (image.link) {
|
|
20009
20011
|
pdfKitDoc.link(image.x, image.y, image._width, image._height, image.link);
|
|
20010
20012
|
}
|
|
20013
|
+
if (image.linkToPage) {
|
|
20014
|
+
pdfKitDoc.ref({ Type: 'Action', S: 'GoTo', D: [image.linkToPage, 0, 0] }).end();
|
|
20015
|
+
pdfKitDoc.annotate(image.x, image.y, image._width, image._height, { Subtype: 'Link', Dest: [image.linkToPage - 1, 'XYZ', null, null, null] });
|
|
20016
|
+
}
|
|
20017
|
+
if (image.linkToDestination) {
|
|
20018
|
+
pdfKitDoc.goTo(image.x, image.y, image._width, image._height, image.linkToDestination);
|
|
20019
|
+
}
|
|
20011
20020
|
}
|
|
20012
20021
|
|
|
20013
20022
|
function renderSVG(svg, x, y, pdfKitDoc, fontProvider) {
|
|
@@ -20286,9 +20295,7 @@ PDFAbstractReference - abstract class for PDF reference
|
|
|
20286
20295
|
*/
|
|
20287
20296
|
|
|
20288
20297
|
|
|
20289
|
-
var PDFAbstractReference =
|
|
20290
|
-
/*#__PURE__*/
|
|
20291
|
-
function () {
|
|
20298
|
+
var PDFAbstractReference = /*#__PURE__*/function () {
|
|
20292
20299
|
function PDFAbstractReference() {
|
|
20293
20300
|
_classCallCheck(this, PDFAbstractReference);
|
|
20294
20301
|
}
|
|
@@ -20303,9 +20310,7 @@ function () {
|
|
|
20303
20310
|
return PDFAbstractReference;
|
|
20304
20311
|
}();
|
|
20305
20312
|
|
|
20306
|
-
var PDFNameTree =
|
|
20307
|
-
/*#__PURE__*/
|
|
20308
|
-
function () {
|
|
20313
|
+
var PDFNameTree = /*#__PURE__*/function () {
|
|
20309
20314
|
function PDFNameTree() {
|
|
20310
20315
|
_classCallCheck(this, PDFNameTree);
|
|
20311
20316
|
|
|
@@ -20403,9 +20408,7 @@ var swapBytes = function swapBytes(buff) {
|
|
|
20403
20408
|
return buff;
|
|
20404
20409
|
};
|
|
20405
20410
|
|
|
20406
|
-
var PDFObject =
|
|
20407
|
-
/*#__PURE__*/
|
|
20408
|
-
function () {
|
|
20411
|
+
var PDFObject = /*#__PURE__*/function () {
|
|
20409
20412
|
function PDFObject() {
|
|
20410
20413
|
_classCallCheck(this, PDFObject);
|
|
20411
20414
|
}
|
|
@@ -20502,9 +20505,7 @@ function () {
|
|
|
20502
20505
|
return PDFObject;
|
|
20503
20506
|
}();
|
|
20504
20507
|
|
|
20505
|
-
var PDFReference =
|
|
20506
|
-
/*#__PURE__*/
|
|
20507
|
-
function (_PDFAbstractReference) {
|
|
20508
|
+
var PDFReference = /*#__PURE__*/function (_PDFAbstractReference) {
|
|
20508
20509
|
_inherits(PDFReference, _PDFAbstractReference);
|
|
20509
20510
|
|
|
20510
20511
|
function PDFReference(document, id) {
|
|
@@ -20666,9 +20667,7 @@ var SIZES = {
|
|
|
20666
20667
|
TABLOID: [792.0, 1224.0]
|
|
20667
20668
|
};
|
|
20668
20669
|
|
|
20669
|
-
var PDFPage =
|
|
20670
|
-
/*#__PURE__*/
|
|
20671
|
-
function () {
|
|
20670
|
+
var PDFPage = /*#__PURE__*/function () {
|
|
20672
20671
|
function PDFPage(document) {
|
|
20673
20672
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
20674
20673
|
|
|
@@ -21212,9 +21211,7 @@ function saslprep(input) {
|
|
|
21212
21211
|
return normalized_input;
|
|
21213
21212
|
}
|
|
21214
21213
|
|
|
21215
|
-
var PDFSecurity =
|
|
21216
|
-
/*#__PURE__*/
|
|
21217
|
-
function () {
|
|
21214
|
+
var PDFSecurity = /*#__PURE__*/function () {
|
|
21218
21215
|
_createClass(PDFSecurity, null, [{
|
|
21219
21216
|
key: "generateFileID",
|
|
21220
21217
|
value: function generateFileID() {
|
|
@@ -21675,9 +21672,7 @@ function wordArrayToBuffer(wordArray) {
|
|
|
21675
21672
|
var PASSWORD_PADDING = [0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08, 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80, 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a];
|
|
21676
21673
|
var number = PDFObject.number;
|
|
21677
21674
|
|
|
21678
|
-
var PDFGradient =
|
|
21679
|
-
/*#__PURE__*/
|
|
21680
|
-
function () {
|
|
21675
|
+
var PDFGradient = /*#__PURE__*/function () {
|
|
21681
21676
|
function PDFGradient(doc) {
|
|
21682
21677
|
_classCallCheck(this, PDFGradient);
|
|
21683
21678
|
|
|
@@ -21906,9 +21901,7 @@ function () {
|
|
|
21906
21901
|
return PDFGradient;
|
|
21907
21902
|
}();
|
|
21908
21903
|
|
|
21909
|
-
var PDFLinearGradient =
|
|
21910
|
-
/*#__PURE__*/
|
|
21911
|
-
function (_PDFGradient) {
|
|
21904
|
+
var PDFLinearGradient = /*#__PURE__*/function (_PDFGradient) {
|
|
21912
21905
|
_inherits(PDFLinearGradient, _PDFGradient);
|
|
21913
21906
|
|
|
21914
21907
|
function PDFLinearGradient(doc, x1, y1, x2, y2) {
|
|
@@ -21945,9 +21938,7 @@ function (_PDFGradient) {
|
|
|
21945
21938
|
return PDFLinearGradient;
|
|
21946
21939
|
}(PDFGradient);
|
|
21947
21940
|
|
|
21948
|
-
var PDFRadialGradient =
|
|
21949
|
-
/*#__PURE__*/
|
|
21950
|
-
function (_PDFGradient2) {
|
|
21941
|
+
var PDFRadialGradient = /*#__PURE__*/function (_PDFGradient2) {
|
|
21951
21942
|
_inherits(PDFRadialGradient, _PDFGradient2);
|
|
21952
21943
|
|
|
21953
21944
|
function PDFRadialGradient(doc, x1, y1, r1, x2, y2, r2) {
|
|
@@ -22721,9 +22712,7 @@ var segmentToBezier = function segmentToBezier(cx, cy, th0, th1, rx, ry, sin_th,
|
|
|
22721
22712
|
return [a00 * x1 + a01 * y1, a10 * x1 + a11 * y1, a00 * x2 + a01 * y2, a10 * x2 + a11 * y2, a00 * x3 + a01 * y3, a10 * x3 + a11 * y3];
|
|
22722
22713
|
};
|
|
22723
22714
|
|
|
22724
|
-
var SVGPath =
|
|
22725
|
-
/*#__PURE__*/
|
|
22726
|
-
function () {
|
|
22715
|
+
var SVGPath = /*#__PURE__*/function () {
|
|
22727
22716
|
function SVGPath() {
|
|
22728
22717
|
_classCallCheck(this, SVGPath);
|
|
22729
22718
|
}
|
|
@@ -23101,9 +23090,7 @@ var WIN_ANSI_MAP = {
|
|
|
23101
23090
|
};
|
|
23102
23091
|
var characters = ".notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n \nspace exclam quotedbl numbersign\ndollar percent ampersand quotesingle\nparenleft parenright asterisk plus\ncomma hyphen period slash\nzero one two three\nfour five six seven\neight nine colon semicolon\nless equal greater question\n \nat A B C\nD E F G\nH I J K\nL M N O\nP Q R S\nT U V W\nX Y Z bracketleft\nbackslash bracketright asciicircum underscore\n \ngrave a b c\nd e f g\nh i j k\nl m n o\np q r s\nt u v w\nx y z braceleft\nbar braceright asciitilde .notdef\n \nEuro .notdef quotesinglbase florin\nquotedblbase ellipsis dagger daggerdbl\ncircumflex perthousand Scaron guilsinglleft\nOE .notdef Zcaron .notdef\n.notdef quoteleft quoteright quotedblleft\nquotedblright bullet endash emdash\ntilde trademark scaron guilsinglright\noe .notdef zcaron ydieresis\n \nspace exclamdown cent sterling\ncurrency yen brokenbar section\ndieresis copyright ordfeminine guillemotleft\nlogicalnot hyphen registered macron\ndegree plusminus twosuperior threesuperior\nacute mu paragraph periodcentered\ncedilla onesuperior ordmasculine guillemotright\nonequarter onehalf threequarters questiondown\n \nAgrave Aacute Acircumflex Atilde\nAdieresis Aring AE Ccedilla\nEgrave Eacute Ecircumflex Edieresis\nIgrave Iacute Icircumflex Idieresis\nEth Ntilde Ograve Oacute\nOcircumflex Otilde Odieresis multiply\nOslash Ugrave Uacute Ucircumflex\nUdieresis Yacute Thorn germandbls\n \nagrave aacute acircumflex atilde\nadieresis aring ae ccedilla\negrave eacute ecircumflex edieresis\nigrave iacute icircumflex idieresis\neth ntilde ograve oacute\nocircumflex otilde odieresis divide\noslash ugrave uacute ucircumflex\nudieresis yacute thorn ydieresis".split(/\s+/);
|
|
23103
23092
|
|
|
23104
|
-
var AFMFont =
|
|
23105
|
-
/*#__PURE__*/
|
|
23106
|
-
function () {
|
|
23093
|
+
var AFMFont = /*#__PURE__*/function () {
|
|
23107
23094
|
_createClass(AFMFont, null, [{
|
|
23108
23095
|
key: "open",
|
|
23109
23096
|
value: function open(filename) {
|
|
@@ -23269,9 +23256,7 @@ function () {
|
|
|
23269
23256
|
return AFMFont;
|
|
23270
23257
|
}();
|
|
23271
23258
|
|
|
23272
|
-
var PDFFont =
|
|
23273
|
-
/*#__PURE__*/
|
|
23274
|
-
function () {
|
|
23259
|
+
var PDFFont = /*#__PURE__*/function () {
|
|
23275
23260
|
function PDFFont() {
|
|
23276
23261
|
_classCallCheck(this, PDFFont);
|
|
23277
23262
|
}
|
|
@@ -23366,9 +23351,7 @@ var STANDARD_FONTS = {
|
|
|
23366
23351
|
}
|
|
23367
23352
|
};
|
|
23368
23353
|
|
|
23369
|
-
var StandardFont =
|
|
23370
|
-
/*#__PURE__*/
|
|
23371
|
-
function (_PDFFont) {
|
|
23354
|
+
var StandardFont = /*#__PURE__*/function (_PDFFont) {
|
|
23372
23355
|
_inherits(StandardFont, _PDFFont);
|
|
23373
23356
|
|
|
23374
23357
|
function StandardFont(document, name, id) {
|
|
@@ -23470,9 +23453,7 @@ var toHex = function toHex(num) {
|
|
|
23470
23453
|
return "0000".concat(num.toString(16)).slice(-4);
|
|
23471
23454
|
};
|
|
23472
23455
|
|
|
23473
|
-
var EmbeddedFont =
|
|
23474
|
-
/*#__PURE__*/
|
|
23475
|
-
function (_PDFFont) {
|
|
23456
|
+
var EmbeddedFont = /*#__PURE__*/function (_PDFFont) {
|
|
23476
23457
|
_inherits(EmbeddedFont, _PDFFont);
|
|
23477
23458
|
|
|
23478
23459
|
function EmbeddedFont(document, font, id) {
|
|
@@ -23776,9 +23757,7 @@ function (_PDFFont) {
|
|
|
23776
23757
|
return EmbeddedFont;
|
|
23777
23758
|
}(PDFFont);
|
|
23778
23759
|
|
|
23779
|
-
var PDFFontFactory =
|
|
23780
|
-
/*#__PURE__*/
|
|
23781
|
-
function () {
|
|
23760
|
+
var PDFFontFactory = /*#__PURE__*/function () {
|
|
23782
23761
|
function PDFFontFactory() {
|
|
23783
23762
|
_classCallCheck(this, PDFFontFactory);
|
|
23784
23763
|
}
|
|
@@ -23903,9 +23882,7 @@ var FontsMixin = {
|
|
|
23903
23882
|
}
|
|
23904
23883
|
};
|
|
23905
23884
|
|
|
23906
|
-
var LineWrapper =
|
|
23907
|
-
/*#__PURE__*/
|
|
23908
|
-
function (_EventEmitter) {
|
|
23885
|
+
var LineWrapper = /*#__PURE__*/function (_EventEmitter) {
|
|
23909
23886
|
_inherits(LineWrapper, _EventEmitter);
|
|
23910
23887
|
|
|
23911
23888
|
function LineWrapper(document, options) {
|
|
@@ -24803,9 +24780,7 @@ var COLOR_SPACE_MAP = {
|
|
|
24803
24780
|
4: 'DeviceCMYK'
|
|
24804
24781
|
};
|
|
24805
24782
|
|
|
24806
|
-
var JPEG =
|
|
24807
|
-
/*#__PURE__*/
|
|
24808
|
-
function () {
|
|
24783
|
+
var JPEG = /*#__PURE__*/function () {
|
|
24809
24784
|
function JPEG(data, label) {
|
|
24810
24785
|
_classCallCheck(this, JPEG);
|
|
24811
24786
|
|
|
@@ -24877,9 +24852,7 @@ function () {
|
|
|
24877
24852
|
return JPEG;
|
|
24878
24853
|
}();
|
|
24879
24854
|
|
|
24880
|
-
var PNGImage =
|
|
24881
|
-
/*#__PURE__*/
|
|
24882
|
-
function () {
|
|
24855
|
+
var PNGImage = /*#__PURE__*/function () {
|
|
24883
24856
|
function PNGImage(data, label) {
|
|
24884
24857
|
_classCallCheck(this, PNGImage);
|
|
24885
24858
|
|
|
@@ -25078,9 +25051,7 @@ function () {
|
|
|
25078
25051
|
return PNGImage;
|
|
25079
25052
|
}();
|
|
25080
25053
|
|
|
25081
|
-
var PDFImage =
|
|
25082
|
-
/*#__PURE__*/
|
|
25083
|
-
function () {
|
|
25054
|
+
var PDFImage = /*#__PURE__*/function () {
|
|
25084
25055
|
function PDFImage() {
|
|
25085
25056
|
_classCallCheck(this, PDFImage);
|
|
25086
25057
|
}
|
|
@@ -25427,9 +25398,7 @@ var AnnotationsMixin = {
|
|
|
25427
25398
|
}
|
|
25428
25399
|
};
|
|
25429
25400
|
|
|
25430
|
-
var PDFOutline =
|
|
25431
|
-
/*#__PURE__*/
|
|
25432
|
-
function () {
|
|
25401
|
+
var PDFOutline = /*#__PURE__*/function () {
|
|
25433
25402
|
function PDFOutline(document, parent, title, dest) {
|
|
25434
25403
|
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
|
|
25435
25404
|
expanded: false
|
|
@@ -25935,9 +25904,7 @@ var AcroFormMixin = {
|
|
|
25935
25904
|
}
|
|
25936
25905
|
};
|
|
25937
25906
|
|
|
25938
|
-
var PDFDocument =
|
|
25939
|
-
/*#__PURE__*/
|
|
25940
|
-
function (_stream$Readable) {
|
|
25907
|
+
var PDFDocument = /*#__PURE__*/function (_stream$Readable) {
|
|
25941
25908
|
_inherits(PDFDocument, _stream$Readable);
|
|
25942
25909
|
|
|
25943
25910
|
function PDFDocument() {
|
|
@@ -27548,7 +27515,7 @@ module.exports = PassThrough;
|
|
|
27548
27515
|
var Transform = __webpack_require__(169);
|
|
27549
27516
|
|
|
27550
27517
|
/*<replacement>*/
|
|
27551
|
-
var util = __webpack_require__(56);
|
|
27518
|
+
var util = Object.create(__webpack_require__(56));
|
|
27552
27519
|
util.inherits = __webpack_require__(46);
|
|
27553
27520
|
/*</replacement>*/
|
|
27554
27521
|
|
|
@@ -57161,6 +57128,9 @@ module.exports = function GetIntrinsic(name, allowMissing) {
|
|
|
57161
57128
|
if (value != null) {
|
|
57162
57129
|
if ($gOPD && (i + 1) >= parts.length) {
|
|
57163
57130
|
var desc = $gOPD(value, parts[i]);
|
|
57131
|
+
if (!allowMissing && !(parts[i] in value)) {
|
|
57132
|
+
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
57133
|
+
}
|
|
57164
57134
|
value = desc ? (desc.get || desc.value) : value[parts[i]];
|
|
57165
57135
|
} else {
|
|
57166
57136
|
value = value[parts[i]];
|
|
@@ -57845,9 +57815,7 @@ var INDEX_1_OFFSET = UTF8_2B_INDEX_2_OFFSET + UTF8_2B_INDEX_2_LENGTH; // The ali
|
|
|
57845
57815
|
|
|
57846
57816
|
var DATA_GRANULARITY = 1 << INDEX_SHIFT;
|
|
57847
57817
|
|
|
57848
|
-
var UnicodeTrie =
|
|
57849
|
-
/*#__PURE__*/
|
|
57850
|
-
function () {
|
|
57818
|
+
var UnicodeTrie = /*#__PURE__*/function () {
|
|
57851
57819
|
function UnicodeTrie(data) {
|
|
57852
57820
|
var isBuffer = typeof data.readUInt32BE === 'function' && typeof data.slice === 'function';
|
|
57853
57821
|
|
|
@@ -58206,9 +58174,7 @@ var FAIL_STATE = 0;
|
|
|
58206
58174
|
* It can perform matches over a sequence of values, similar to a regular expression.
|
|
58207
58175
|
*/
|
|
58208
58176
|
|
|
58209
|
-
var StateMachine =
|
|
58210
|
-
/*#__PURE__*/
|
|
58211
|
-
function () {
|
|
58177
|
+
var StateMachine = /*#__PURE__*/function () {
|
|
58212
58178
|
function StateMachine(dfa) {
|
|
58213
58179
|
this.stateTable = dfa.stateTable;
|
|
58214
58180
|
this.accepting = dfa.accepting;
|
|
@@ -58226,9 +58192,7 @@ function () {
|
|
|
58226
58192
|
var _ref;
|
|
58227
58193
|
|
|
58228
58194
|
var self = this;
|
|
58229
|
-
return _ref = {}, _ref[Symbol.iterator] =
|
|
58230
|
-
/*#__PURE__*/
|
|
58231
|
-
regeneratorRuntime.mark(function _callee() {
|
|
58195
|
+
return _ref = {}, _ref[Symbol.iterator] = /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
58232
58196
|
var state, startRun, lastAccepting, lastState, p, c;
|
|
58233
58197
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
58234
58198
|
while (1) {
|
|
@@ -60249,9 +60213,7 @@ var INDEX_1_OFFSET = UTF8_2B_INDEX_2_OFFSET + UTF8_2B_INDEX_2_LENGTH; // The ali
|
|
|
60249
60213
|
|
|
60250
60214
|
var DATA_GRANULARITY = 1 << INDEX_SHIFT;
|
|
60251
60215
|
|
|
60252
|
-
var UnicodeTrie =
|
|
60253
|
-
/*#__PURE__*/
|
|
60254
|
-
function () {
|
|
60216
|
+
var UnicodeTrie = /*#__PURE__*/function () {
|
|
60255
60217
|
function UnicodeTrie(data) {
|
|
60256
60218
|
var isBuffer = typeof data.readUInt32BE === 'function' && typeof data.slice === 'function';
|
|
60257
60219
|
|
|
@@ -60601,9 +60563,7 @@ var fs = __webpack_require__(84);
|
|
|
60601
60563
|
|
|
60602
60564
|
var zlib = __webpack_require__(170);
|
|
60603
60565
|
|
|
60604
|
-
module.exports =
|
|
60605
|
-
/*#__PURE__*/
|
|
60606
|
-
function () {
|
|
60566
|
+
module.exports = /*#__PURE__*/function () {
|
|
60607
60567
|
PNG.decode = function decode(path, fn) {
|
|
60608
60568
|
return fs.readFile(path, function (err, file) {
|
|
60609
60569
|
var png = new PNG(file);
|
|
@@ -61106,6 +61066,7 @@ var getNodeId = __webpack_require__(0).getNodeId;
|
|
|
61106
61066
|
var isFunction = __webpack_require__(0).isFunction;
|
|
61107
61067
|
var TextTools = __webpack_require__(130);
|
|
61108
61068
|
var StyleContextStack = __webpack_require__(211);
|
|
61069
|
+
var isNumber = __webpack_require__(0).isNumber;
|
|
61109
61070
|
|
|
61110
61071
|
function addAll(target, otherArray) {
|
|
61111
61072
|
otherArray.forEach(function (item) {
|
|
@@ -61178,40 +61139,35 @@ LayoutBuilder.prototype.layoutDocument = function (docStructure, fontProvider, s
|
|
|
61178
61139
|
node.nodeInfo = nodeInfo;
|
|
61179
61140
|
});
|
|
61180
61141
|
|
|
61181
|
-
|
|
61142
|
+
for (var index = 0; index < linearNodeList.length; index++) {
|
|
61143
|
+
var node = linearNodeList[index];
|
|
61182
61144
|
if (node.pageBreak !== 'before' && !node.pageBreakCalculated) {
|
|
61183
61145
|
node.pageBreakCalculated = true;
|
|
61184
61146
|
var pageNumber = node.nodeInfo.pageNumbers[0];
|
|
61185
|
-
|
|
61186
|
-
var
|
|
61187
|
-
|
|
61188
|
-
|
|
61189
|
-
|
|
61190
|
-
|
|
61191
|
-
|
|
61192
|
-
|
|
61193
|
-
|
|
61194
|
-
|
|
61195
|
-
|
|
61196
|
-
|
|
61197
|
-
|
|
61198
|
-
|
|
61199
|
-
|
|
61200
|
-
|
|
61201
|
-
|
|
61202
|
-
return node.nodeInfo;
|
|
61203
|
-
}),
|
|
61204
|
-
nodesOnNextPage.map(function (node) {
|
|
61205
|
-
return node.nodeInfo;
|
|
61206
|
-
}),
|
|
61207
|
-
previousNodesOnPage.map(function (node) {
|
|
61208
|
-
return node.nodeInfo;
|
|
61209
|
-
}))) {
|
|
61147
|
+
var followingNodesOnPage = [];
|
|
61148
|
+
var nodesOnNextPage = [];
|
|
61149
|
+
var previousNodesOnPage = [];
|
|
61150
|
+
for (var ii = index + 1, l = linearNodeList.length; ii < l; ii++) {
|
|
61151
|
+
if (linearNodeList[ii].nodeInfo.pageNumbers.indexOf(pageNumber) > -1) {
|
|
61152
|
+
followingNodesOnPage.push(linearNodeList[ii].nodeInfo);
|
|
61153
|
+
}
|
|
61154
|
+
if (linearNodeList[ii].nodeInfo.pageNumbers.indexOf(pageNumber + 1) > -1) {
|
|
61155
|
+
nodesOnNextPage.push(linearNodeList[ii].nodeInfo);
|
|
61156
|
+
}
|
|
61157
|
+
}
|
|
61158
|
+
for (var ii = 0; ii < index; ii++) {
|
|
61159
|
+
if (linearNodeList[ii].nodeInfo.pageNumbers.indexOf(pageNumber) > -1) {
|
|
61160
|
+
previousNodesOnPage.push(linearNodeList[ii].nodeInfo);
|
|
61161
|
+
}
|
|
61162
|
+
}
|
|
61163
|
+
if (pageBreakBeforeFct(node.nodeInfo, followingNodesOnPage, nodesOnNextPage, previousNodesOnPage)) {
|
|
61210
61164
|
node.pageBreak = 'before';
|
|
61211
61165
|
return true;
|
|
61212
61166
|
}
|
|
61213
61167
|
}
|
|
61214
|
-
}
|
|
61168
|
+
}
|
|
61169
|
+
|
|
61170
|
+
return false;
|
|
61215
61171
|
}
|
|
61216
61172
|
|
|
61217
61173
|
this.docPreprocessor = new DocPreprocessor();
|
|
@@ -61345,7 +61301,7 @@ LayoutBuilder.prototype.addWatermark = function (watermark, fontProvider, defaul
|
|
|
61345
61301
|
watermark.font = watermark.font || defaultStyle.font || 'Roboto';
|
|
61346
61302
|
watermark.fontSize = watermark.fontSize || 'auto';
|
|
61347
61303
|
watermark.color = watermark.color || 'black';
|
|
61348
|
-
watermark.opacity = watermark.opacity
|
|
61304
|
+
watermark.opacity = isNumber(watermark.opacity) ? watermark.opacity : 0.6;
|
|
61349
61305
|
watermark.bold = watermark.bold || false;
|
|
61350
61306
|
watermark.italics = watermark.italics || false;
|
|
61351
61307
|
watermark.angle = !isUndefined(watermark.angle) && !isNull(watermark.angle) ? watermark.angle : null;
|
|
@@ -62771,6 +62727,7 @@ DocMeasure.prototype.measureTable = function (node) {
|
|
|
62771
62727
|
return function () {
|
|
62772
62728
|
if (isObject(data)) {
|
|
62773
62729
|
data.fillColor = _this.styleStack.getProperty('fillColor');
|
|
62730
|
+
data.fillOpacity = _this.styleStack.getProperty('fillOpacity');
|
|
62774
62731
|
}
|
|
62775
62732
|
return _this.measureNode(data);
|
|
62776
62733
|
};
|
|
@@ -62817,6 +62774,9 @@ DocMeasure.prototype.measureTable = function (node) {
|
|
|
62817
62774
|
fillColor: function (i, node) {
|
|
62818
62775
|
return null;
|
|
62819
62776
|
},
|
|
62777
|
+
fillOpacity: function (i, node) {
|
|
62778
|
+
return 1;
|
|
62779
|
+
},
|
|
62820
62780
|
defaultBorder: true
|
|
62821
62781
|
};
|
|
62822
62782
|
|
|
@@ -62899,7 +62859,8 @@ DocMeasure.prototype.measureTable = function (node) {
|
|
|
62899
62859
|
_span: true,
|
|
62900
62860
|
_minWidth: 0,
|
|
62901
62861
|
_maxWidth: 0,
|
|
62902
|
-
fillColor: table.body[row][col].fillColor
|
|
62862
|
+
fillColor: table.body[row][col].fillColor,
|
|
62863
|
+
fillOpacity: table.body[row][col].fillOpacity
|
|
62903
62864
|
};
|
|
62904
62865
|
}
|
|
62905
62866
|
}
|
|
@@ -64284,6 +64245,7 @@ module.exports = ElementWriter;
|
|
|
64284
64245
|
|
|
64285
64246
|
var ColumnCalculator = __webpack_require__(131);
|
|
64286
64247
|
var isFunction = __webpack_require__(0).isFunction;
|
|
64248
|
+
var isNumber = __webpack_require__(0).isNumber;
|
|
64287
64249
|
|
|
64288
64250
|
function TableProcessor(tableNode) {
|
|
64289
64251
|
this.tableNode = tableNode;
|
|
@@ -64701,9 +64663,13 @@ TableProcessor.prototype.endRow = function (rowIndex, writer, pageBreaks) {
|
|
|
64701
64663
|
|
|
64702
64664
|
if (i < l - 1) {
|
|
64703
64665
|
var fillColor = body[rowIndex][colIndex].fillColor;
|
|
64666
|
+
var fillOpacity = body[rowIndex][colIndex].fillOpacity;
|
|
64704
64667
|
if (!fillColor) {
|
|
64705
64668
|
fillColor = isFunction(this.layout.fillColor) ? this.layout.fillColor(rowIndex, this.tableNode, colIndex) : this.layout.fillColor;
|
|
64706
64669
|
}
|
|
64670
|
+
if (!isNumber(fillOpacity)) {
|
|
64671
|
+
fillOpacity = isFunction(this.layout.fillOpacity) ? this.layout.fillOpacity(rowIndex, this.tableNode, colIndex) : this.layout.fillOpacity;
|
|
64672
|
+
}
|
|
64707
64673
|
if (fillColor) {
|
|
64708
64674
|
var widthLeftBorder = leftCellBorder ? this.layout.vLineWidth(colIndex, this.tableNode) : 0;
|
|
64709
64675
|
var widthRightBorder;
|
|
@@ -64726,7 +64692,8 @@ TableProcessor.prototype.endRow = function (rowIndex, writer, pageBreaks) {
|
|
|
64726
64692
|
w: x2f - x1f,
|
|
64727
64693
|
h: y2f - y1f,
|
|
64728
64694
|
lineWidth: 0,
|
|
64729
|
-
color: fillColor
|
|
64695
|
+
color: fillColor,
|
|
64696
|
+
fillOpacity: fillOpacity
|
|
64730
64697
|
}, false, true, writer.context().backgroundLength[writer.context().page]);
|
|
64731
64698
|
}
|
|
64732
64699
|
}
|