1
- /*! pdfmake v0.1.38 , @license MIT, @link http://pdfmake.org */
1
+ /*! pdfmake v0.1.39 , @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();
@@ -7397,24 +7397,24 @@ function measure(fontProvider, textArray, styleContextStack) {
7397
7397
var linkToPage = getStyleProperty(item, styleContextStack, 'linkToPage', null);
7398
7398
var noWrap = getStyleProperty(item, styleContextStack, 'noWrap', null);
7399
7399
var preserveLeadingSpaces = getStyleProperty(item, styleContextStack, 'preserveLeadingSpaces', false);
7400
+ var preserveTrailingSpaces = getStyleProperty(item, styleContextStack, 'preserveTrailingSpaces', false);
7400
7401
7401
7402
var font = fontProvider.provideFont(fontName, bold, italics);
7402
7403
7403
7404
item.width = widthOfString(item.text, font, fontSize, characterSpacing, fontFeatures);
7404
7405
item.height = font.lineHeight(fontSize) * lineHeight;
7405
7406
7406
- var leadingSpaces = item.text.match(LEADING);
7407
-
7408
7407
if (!item.leadingCut) {
7409
7408
item.leadingCut = 0;
7410
7409
}
7411
7410
7412
- if (leadingSpaces && !preserveLeadingSpaces) {
7411
+ var leadingSpaces;
7412
+ if (!preserveLeadingSpaces && (leadingSpaces = item.text.match(LEADING))) {
7413
7413
item.leadingCut += widthOfString(leadingSpaces[0], font, fontSize, characterSpacing, fontFeatures);
7414
7414
}
7415
7415
7416
- var trailingSpaces = item.text.match(TRAILING) ;
7417
- if (trailingSpaces) {
7416
+ var trailingSpaces;
7417
+ if (!preserveTrailingSpaces && ( trailingSpaces = item.text.match(TRAILING)) ) {
7418
7418
item.trailingCut = widthOfString(trailingSpaces[0], font, fontSize, characterSpacing, fontFeatures);
7419
7419
} else {
7420
7420
item.trailingCut = 0;
@@ -13800,6 +13800,7 @@ function renderVector(vector, pdfKitDoc) {
13800
13800
}
13801
13801
13802
13802
function renderImage(image, x, y, pdfKitDoc) {
13803
+ pdfKitDoc.opacity(image.opacity || 1);
13803
13804
pdfKitDoc.image(image.image, image.x, image.y, {width: image._width, height: image._height});
13804
13805
if (image.link) {
13805
13806
pdfKitDoc.link(image.x, image.y, image._width, image._height, image.link);
@@ -48140,6 +48141,12 @@ DocMeasure.prototype.measureTable = function (node) {
48140
48141
vLineColor: function (i, node) {
48141
48142
return 'black';
48142
48143
},
48144
+ hLineStyle: function (i, node) {
48145
+ return null;
48146
+ },
48147
+ vLineStyle: function (i, node) {
48148
+ return null;
48149
+ },
48143
48150
paddingLeft: function (i, node) {
48144
48151
return 4;
48145
48152
},
@@ -49198,7 +49205,7 @@ PageElementWriter.prototype.moveToNextPage = function (pageOrientation) {
49198
49205
this.writer.tracker.emit('pageChanged', {
49199
49206
prevPage: nextPage.prevPage,
49200
49207
prevY: nextPage.prevY,
49201
- y: nextPage .y
49208
+ y: this.writer.context .y
49202
49209
});
49203
49210
};
49204
49211
@@ -49754,6 +49761,12 @@ TableProcessor.prototype.beginRow = function (rowIndex, writer) {
49754
49761
TableProcessor.prototype.drawHorizontalLine = function (lineIndex, writer, overrideY) {
49755
49762
var lineWidth = this.layout.hLineWidth(lineIndex, this.tableNode);
49756
49763
if (lineWidth) {
49764
+ var style = this.layout.hLineStyle(lineIndex, this.tableNode);
49765
+ var dash;
49766
+ if (style && style.dash) {
49767
+ dash = style.dash;
49768
+ }
49769
+
49757
49770
var offset = lineWidth / 2;
49758
49771
var currentLine = null;
49759
49772
var body = this.tableNode.table.body;
@@ -49801,6 +49814,7 @@ TableProcessor.prototype.drawHorizontalLine = function (lineIndex, writer, overr
49801
49814
y1: y,
49802
49815
y2: y,
49803
49816
lineWidth: lineWidth,
49817
+ dash: dash,
49804
49818
lineColor: isFunction(this.layout.hLineColor) ? this.layout.hLineColor(lineIndex, this.tableNode) : this.layout.hLineColor
49805
49819
}, false, overrideY);
49806
49820
currentLine = null;
@@ -49817,21 +49831,26 @@ TableProcessor.prototype.drawVerticalLine = function (x, y0, y1, vLineIndex, wri
49817
49831
if (width === 0) {
49818
49832
return;
49819
49833
}
49834
+ var style = this.layout.vLineStyle(vLineIndex, this.tableNode);
49835
+ var dash;
49836
+ if (style && style.dash) {
49837
+ dash = style.dash;
49838
+ }
49820
49839
writer.addVector({
49821
49840
type: 'line',
49822
49841
x1: x + width / 2,
49823
49842
x2: x + width / 2,
49824
49843
y1: y0,
49825
49844
y2: y1,
49826
49845
lineWidth: width,
49846
+ dash: dash,
49827
49847
lineColor: isFunction(this.layout.vLineColor) ? this.layout.vLineColor(vLineIndex, this.tableNode) : this.layout.vLineColor
49828
49848
}, false, true);
49829
49849
};
49830
49850
49831
49851
TableProcessor.prototype.endTable = function (writer) {
49832
49852
if (this.cleanUpRepeatables) {
49833
49853
writer.popFromRepeatables();
49834
- this.headerRepeatableHeight = null;
49835
49854
}
49836
49855
};
49837
49856
@@ -49863,10 +49882,6 @@ TableProcessor.prototype.endRow = function (rowIndex, writer, pageBreaks) {
49863
49882
ys[ys.length - 1].y1 = pageBreak.prevY;
49864
49883
49865
49884
ys.push({y0: pageBreak.y, page: pageBreak.prevPage + 1});
49866
-
49867
- if (this.headerRepeatableHeight) {
49868
- ys[ys.length - 1].y0 += this.headerRepeatableHeight;
49869
- }
49870
49885
}
49871
49886
}
49872
49887
@@ -49983,7 +49998,6 @@ TableProcessor.prototype.endRow = function (rowIndex, writer, pageBreaks) {
49983
49998
}
49984
49999
49985
50000
if (this.headerRepeatable && (rowIndex === (this.rowsWithoutPageBreak - 1) || rowIndex === this.tableNode.table.body.length - 1)) {
49986
- this.headerRepeatableHeight = this.headerRepeatable.height;
49987
50001
writer.commitUnbreakableBlock();
49988
50002
writer.pushToRepeatables(this.headerRepeatable);
49989
50003
this.cleanUpRepeatables = true;
0 commit comments