@flowaccount/pdfmake 1.0.7-staging.0 → 1.0.7-staging.1
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 +488 -482
- package/build/pdfmake.min.js +2 -2
- package/build/pdfmake.min.js.map +1 -1
- package/package.json +1 -1
- package/src/tableProcessor.js +6 -4
- package/src/textTools.js +4 -0
package/package.json
CHANGED
package/src/tableProcessor.js
CHANGED
|
@@ -44,10 +44,12 @@ TableProcessor.prototype.beginTable = function (writer) {
|
|
|
44
44
|
var headerRows = tableNode.table.headerRows;
|
|
45
45
|
|
|
46
46
|
if (isPositiveInteger(headerRows)) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (
|
|
50
|
-
|
|
47
|
+
// Fix: If headerRows exceeds available rows, adjust to match body length
|
|
48
|
+
// This prevents errors when tables have empty bodies
|
|
49
|
+
if (headerRows > tableNode.table.body.length) {
|
|
50
|
+
this.headerRows = tableNode.table.body.length;
|
|
51
|
+
} else {
|
|
52
|
+
this.headerRows = headerRows;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
this.rowsWithoutPageBreak = this.headerRows;
|
package/src/textTools.js
CHANGED
|
@@ -316,6 +316,10 @@ function getStyleProperty(item, styleContextStack, property, defaultValue) {
|
|
|
316
316
|
value = styleContextStack.getProperty(property);
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
+
if(property === 'bold' && (item.text === '' || item.text === '\u200B')) {
|
|
320
|
+
return false
|
|
321
|
+
}
|
|
322
|
+
|
|
319
323
|
if (value !== null && value !== undefined) {
|
|
320
324
|
return value;
|
|
321
325
|
} else {
|