pdfmake 0.2.12 → 0.2.13

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/src/printer.js CHANGED
@@ -125,7 +125,7 @@ PdfPrinter.prototype.createPdfKitDocument = function (docDefinition, options) {
125
125
  userPassword: docDefinition.userPassword,
126
126
  ownerPassword: docDefinition.ownerPassword,
127
127
  permissions: docDefinition.permissions,
128
- lang: docDefinition.language,
128
+ lang: docDefinition.language,
129
129
  fontLayoutCache: isBoolean(options.fontLayoutCache) ? options.fontLayoutCache : true,
130
130
  bufferPages: options.bufferPages || false,
131
131
  autoFirstPage: false,
@@ -43,7 +43,7 @@ TableProcessor.prototype.beginTable = function (writer) {
43
43
  const keepWithHeaderRows = tableNode.table.keepWithHeaderRows;
44
44
 
45
45
  if (isPositiveInteger(keepWithHeaderRows)) {
46
- this.rowsWithoutPageBreak += keepWithHeaderRows;
46
+ this.rowsWithoutPageBreak += keepWithHeaderRows;
47
47
  }
48
48
  }
49
49
 
@@ -476,7 +476,9 @@ TableProcessor.prototype.endRow = function (rowIndex, writer, pageBreaks) {
476
476
  h: bgHeight,
477
477
  lineWidth: 0,
478
478
  color: fillColor,
479
- fillOpacity: fillOpacity
479
+ fillOpacity: fillOpacity,
480
+ // mark if we are in an unbreakable block
481
+ _isFillColorFromUnbreakable: !!writer.transactionLevel
480
482
  }, false, true, writer.context().backgroundLength[writer.context().page]);
481
483
  }
482
484
 
package/src/textTools.js CHANGED
@@ -112,7 +112,7 @@ TextTools.prototype.sizeOfRotatedText = function (text, angle, styleContextStack
112
112
  width: Math.abs(size.height * Math.sin(angleRad)) + Math.abs(size.width * Math.cos(angleRad)),
113
113
  height: Math.abs(size.width * Math.sin(angleRad)) + Math.abs(size.height * Math.cos(angleRad))
114
114
  };
115
- }
115
+ };
116
116
 
117
117
  TextTools.prototype.widthOfString = function (text, font, fontSize, characterSpacing, fontFeatures) {
118
118
  return widthOfString(text, font, fontSize, characterSpacing, fontFeatures);
@@ -320,7 +320,7 @@ function measure(fontProvider, textArray, styleContextStack) {
320
320
 
321
321
  if ((sup || sub) && item.fontSize === undefined) {
322
322
  // font size reduction taken from here: https://en.wikipedia.org/wiki/Subscript_and_superscript#Desktop_publishing
323
- fontSize *= 0.58
323
+ fontSize *= 0.58;
324
324
  }
325
325
 
326
326
  var font = fontProvider.provideFont(fontName, bold, italics);