@syncfusion/ej2-pdf-export 19.4.42 → 19.4.52

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.
Files changed (165) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/dist/ej2-pdf-export.umd.min.js +2 -2
  3. package/dist/ej2-pdf-export.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-pdf-export.es2015.js +61 -16
  5. package/dist/es6/ej2-pdf-export.es2015.js.map +1 -1
  6. package/dist/es6/ej2-pdf-export.es5.js +61 -16
  7. package/dist/es6/ej2-pdf-export.es5.js.map +1 -1
  8. package/dist/global/ej2-pdf-export.min.js +2 -2
  9. package/dist/global/ej2-pdf-export.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +6 -7
  12. package/src/implementation/structured-elements/grid/layout/grid-layouter.d.ts +1 -0
  13. package/src/implementation/structured-elements/grid/layout/grid-layouter.js +43 -14
  14. package/src/implementation/structured-elements/grid/pdf-grid-row.d.ts +1 -0
  15. package/src/implementation/structured-elements/grid/pdf-grid-row.js +4 -2
  16. package/src/implementation/structured-elements/grid/pdf-grid.js +14 -0
  17. package/dist/ts/implementation/actions/action.ts +0 -76
  18. package/dist/ts/implementation/actions/uri-action.ts +0 -52
  19. package/dist/ts/implementation/annotations/action-link-annotation.ts +0 -43
  20. package/dist/ts/implementation/annotations/annotation-collection.ts +0 -159
  21. package/dist/ts/implementation/annotations/annotation.ts +0 -241
  22. package/dist/ts/implementation/annotations/document-link-annotation.ts +0 -118
  23. package/dist/ts/implementation/annotations/link-annotation.ts +0 -32
  24. package/dist/ts/implementation/annotations/pdf-text-web-link.ts +0 -265
  25. package/dist/ts/implementation/annotations/uri-annotation.ts +0 -86
  26. package/dist/ts/implementation/collections/dictionary.ts +0 -150
  27. package/dist/ts/implementation/collections/object-object-pair/dictionary.ts +0 -125
  28. package/dist/ts/implementation/collections/utils.ts +0 -38
  29. package/dist/ts/implementation/document/automatic-fields/automatic-field-info-collection.ts +0 -39
  30. package/dist/ts/implementation/document/automatic-fields/automatic-field-info.ts +0 -108
  31. package/dist/ts/implementation/document/automatic-fields/automatic-field.ts +0 -127
  32. package/dist/ts/implementation/document/automatic-fields/composite-field.ts +0 -76
  33. package/dist/ts/implementation/document/automatic-fields/multiple-value-field.ts +0 -37
  34. package/dist/ts/implementation/document/automatic-fields/page-count-field.ts +0 -75
  35. package/dist/ts/implementation/document/automatic-fields/pdf-numbers-convertor.ts +0 -157
  36. package/dist/ts/implementation/document/automatic-fields/pdf-page-number-field.ts +0 -82
  37. package/dist/ts/implementation/document/automatic-fields/pdf-template-value-pair.ts +0 -60
  38. package/dist/ts/implementation/document/automatic-fields/single-value-field.ts +0 -48
  39. package/dist/ts/implementation/document/pdf-catalog.ts +0 -52
  40. package/dist/ts/implementation/document/pdf-document-base.ts +0 -166
  41. package/dist/ts/implementation/document/pdf-document-template.ts +0 -310
  42. package/dist/ts/implementation/document/pdf-document.ts +0 -342
  43. package/dist/ts/implementation/drawing/pdf-drawing.ts +0 -218
  44. package/dist/ts/implementation/general/enum.ts +0 -21
  45. package/dist/ts/implementation/general/functions/pdf-function.ts +0 -66
  46. package/dist/ts/implementation/general/functions/pdf-sampled-function.ts +0 -62
  47. package/dist/ts/implementation/general/pdf-cache-collection.ts +0 -97
  48. package/dist/ts/implementation/general/pdf-collection.ts +0 -41
  49. package/dist/ts/implementation/general/pdf-destination.ts +0 -170
  50. package/dist/ts/implementation/graphics/brushes/enum.ts +0 -237
  51. package/dist/ts/implementation/graphics/brushes/pdf-blend.ts +0 -294
  52. package/dist/ts/implementation/graphics/brushes/pdf-brush.ts +0 -68
  53. package/dist/ts/implementation/graphics/brushes/pdf-brushes.ts +0 -2438
  54. package/dist/ts/implementation/graphics/brushes/pdf-color-blend.ts +0 -295
  55. package/dist/ts/implementation/graphics/brushes/pdf-gradient-brush.ts +0 -311
  56. package/dist/ts/implementation/graphics/brushes/pdf-linear-gradient-brush.ts +0 -406
  57. package/dist/ts/implementation/graphics/brushes/pdf-radial-gradient-brush.ts +0 -290
  58. package/dist/ts/implementation/graphics/brushes/pdf-solid-brush.ts +0 -107
  59. package/dist/ts/implementation/graphics/brushes/pdf-tiling-brush.ts +0 -304
  60. package/dist/ts/implementation/graphics/constants.ts +0 -31
  61. package/dist/ts/implementation/graphics/enum.ts +0 -413
  62. package/dist/ts/implementation/graphics/figures/arc.ts +0 -133
  63. package/dist/ts/implementation/graphics/figures/base/draw-element.ts +0 -59
  64. package/dist/ts/implementation/graphics/figures/base/element-layouter.ts +0 -260
  65. package/dist/ts/implementation/graphics/figures/base/fill-element.ts +0 -72
  66. package/dist/ts/implementation/graphics/figures/base/graphics-element.ts +0 -34
  67. package/dist/ts/implementation/graphics/figures/base/pdf-shape-element.ts +0 -69
  68. package/dist/ts/implementation/graphics/figures/base/shape-layouter.ts +0 -276
  69. package/dist/ts/implementation/graphics/figures/base/text-layouter.ts +0 -205
  70. package/dist/ts/implementation/graphics/figures/ellipse-part.ts +0 -76
  71. package/dist/ts/implementation/graphics/figures/enum.ts +0 -80
  72. package/dist/ts/implementation/graphics/figures/layout-element.ts +0 -132
  73. package/dist/ts/implementation/graphics/figures/path.ts +0 -646
  74. package/dist/ts/implementation/graphics/figures/pdf-template.ts +0 -205
  75. package/dist/ts/implementation/graphics/figures/rectangle-area.ts +0 -108
  76. package/dist/ts/implementation/graphics/figures/text-element.ts +0 -445
  77. package/dist/ts/implementation/graphics/fonts/enum.ts +0 -385
  78. package/dist/ts/implementation/graphics/fonts/pdf-font-metrics.ts +0 -248
  79. package/dist/ts/implementation/graphics/fonts/pdf-font.ts +0 -316
  80. package/dist/ts/implementation/graphics/fonts/pdf-standard-font-metrics-factory.ts +0 -606
  81. package/dist/ts/implementation/graphics/fonts/pdf-standard-font.ts +0 -243
  82. package/dist/ts/implementation/graphics/fonts/pdf-string-format.ts +0 -474
  83. package/dist/ts/implementation/graphics/fonts/pdf-true-type-font.ts +0 -165
  84. package/dist/ts/implementation/graphics/fonts/rtl/rtl-bidirectional.ts +0 -958
  85. package/dist/ts/implementation/graphics/fonts/rtl/rtl-text-shape.ts +0 -374
  86. package/dist/ts/implementation/graphics/fonts/rtl-renderer.ts +0 -255
  87. package/dist/ts/implementation/graphics/fonts/string-layouter.ts +0 -617
  88. package/dist/ts/implementation/graphics/fonts/string-tokenizer.ts +0 -275
  89. package/dist/ts/implementation/graphics/fonts/ttf-OS2-Table.ts +0 -206
  90. package/dist/ts/implementation/graphics/fonts/ttf-apple-cmap-sub-table.ts +0 -18
  91. package/dist/ts/implementation/graphics/fonts/ttf-cmap-sub-table.ts +0 -18
  92. package/dist/ts/implementation/graphics/fonts/ttf-cmap-table.ts +0 -14
  93. package/dist/ts/implementation/graphics/fonts/ttf-glyph-header.ts +0 -26
  94. package/dist/ts/implementation/graphics/fonts/ttf-glyph-info.ts +0 -35
  95. package/dist/ts/implementation/graphics/fonts/ttf-head-table.ts +0 -94
  96. package/dist/ts/implementation/graphics/fonts/ttf-horizontal-header-table.ts +0 -56
  97. package/dist/ts/implementation/graphics/fonts/ttf-loca-table.ts +0 -10
  98. package/dist/ts/implementation/graphics/fonts/ttf-long-hor-metric.ts +0 -14
  99. package/dist/ts/implementation/graphics/fonts/ttf-metrics.ts +0 -106
  100. package/dist/ts/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.ts +0 -58
  101. package/dist/ts/implementation/graphics/fonts/ttf-name-record.ts +0 -33
  102. package/dist/ts/implementation/graphics/fonts/ttf-name-table.ts +0 -22
  103. package/dist/ts/implementation/graphics/fonts/ttf-post-table.ts +0 -42
  104. package/dist/ts/implementation/graphics/fonts/ttf-reader.ts +0 -1254
  105. package/dist/ts/implementation/graphics/fonts/ttf-table-info.ts +0 -26
  106. package/dist/ts/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.ts +0 -26
  107. package/dist/ts/implementation/graphics/fonts/unicode-true-type-font.ts +0 -577
  108. package/dist/ts/implementation/graphics/images/byte-array.ts +0 -137
  109. package/dist/ts/implementation/graphics/images/image-decoder.ts +0 -437
  110. package/dist/ts/implementation/graphics/images/pdf-bitmap.ts +0 -110
  111. package/dist/ts/implementation/graphics/images/pdf-image.ts +0 -132
  112. package/dist/ts/implementation/graphics/pdf-color.ts +0 -478
  113. package/dist/ts/implementation/graphics/pdf-graphics.ts +0 -2424
  114. package/dist/ts/implementation/graphics/pdf-margins.ts +0 -124
  115. package/dist/ts/implementation/graphics/pdf-pen.ts +0 -370
  116. package/dist/ts/implementation/graphics/pdf-resources.ts +0 -300
  117. package/dist/ts/implementation/graphics/pdf-transformation-matrix.ts +0 -246
  118. package/dist/ts/implementation/graphics/pdf-transparency.ts +0 -93
  119. package/dist/ts/implementation/graphics/unit-convertor.ts +0 -96
  120. package/dist/ts/implementation/input-output/big-endian-writer.ts +0 -121
  121. package/dist/ts/implementation/input-output/cross-table.ts +0 -21
  122. package/dist/ts/implementation/input-output/enum.ts +0 -16
  123. package/dist/ts/implementation/input-output/pdf-cross-table.ts +0 -524
  124. package/dist/ts/implementation/input-output/pdf-dictionary-properties.ts +0 -515
  125. package/dist/ts/implementation/input-output/pdf-main-object-collection.ts +0 -194
  126. package/dist/ts/implementation/input-output/pdf-operators.ts +0 -363
  127. package/dist/ts/implementation/input-output/pdf-stream-writer.ts +0 -681
  128. package/dist/ts/implementation/input-output/pdf-writer.ts +0 -88
  129. package/dist/ts/implementation/pages/enum.ts +0 -201
  130. package/dist/ts/implementation/pages/page-added-event-arguments.ts +0 -39
  131. package/dist/ts/implementation/pages/pdf-document-page-collection.ts +0 -180
  132. package/dist/ts/implementation/pages/pdf-page-base.ts +0 -181
  133. package/dist/ts/implementation/pages/pdf-page-layer-collection.ts +0 -348
  134. package/dist/ts/implementation/pages/pdf-page-layer.ts +0 -271
  135. package/dist/ts/implementation/pages/pdf-page-settings.ts +0 -192
  136. package/dist/ts/implementation/pages/pdf-page-size.ts +0 -162
  137. package/dist/ts/implementation/pages/pdf-page-template-element.ts +0 -659
  138. package/dist/ts/implementation/pages/pdf-page.ts +0 -235
  139. package/dist/ts/implementation/pages/pdf-section-collection.ts +0 -187
  140. package/dist/ts/implementation/pages/pdf-section-page-collection.ts +0 -61
  141. package/dist/ts/implementation/pages/pdf-section-templates.ts +0 -96
  142. package/dist/ts/implementation/pages/pdf-section.ts +0 -644
  143. package/dist/ts/implementation/primitives/pdf-array.ts +0 -386
  144. package/dist/ts/implementation/primitives/pdf-boolean.ts +0 -119
  145. package/dist/ts/implementation/primitives/pdf-dictionary.ts +0 -513
  146. package/dist/ts/implementation/primitives/pdf-name.ts +0 -218
  147. package/dist/ts/implementation/primitives/pdf-number.ts +0 -165
  148. package/dist/ts/implementation/primitives/pdf-reference.ts +0 -430
  149. package/dist/ts/implementation/primitives/pdf-stream.ts +0 -336
  150. package/dist/ts/implementation/primitives/pdf-string.ts +0 -397
  151. package/dist/ts/implementation/structured-elements/grid/layout/grid-layouter.ts +0 -1998
  152. package/dist/ts/implementation/structured-elements/grid/pdf-grid-cell.ts +0 -1189
  153. package/dist/ts/implementation/structured-elements/grid/pdf-grid-column.ts +0 -206
  154. package/dist/ts/implementation/structured-elements/grid/pdf-grid-row.ts +0 -468
  155. package/dist/ts/implementation/structured-elements/grid/pdf-grid.ts +0 -839
  156. package/dist/ts/implementation/structured-elements/grid/styles/pdf-borders.ts +0 -240
  157. package/dist/ts/implementation/structured-elements/grid/styles/style.ts +0 -424
  158. package/dist/ts/implementation/structured-elements/tables/light-tables/enum.ts +0 -16
  159. package/dist/ts/interfaces/i-pdf-cache.ts +0 -23
  160. package/dist/ts/interfaces/i-pdf-changable.ts +0 -17
  161. package/dist/ts/interfaces/i-pdf-clonable.ts +0 -12
  162. package/dist/ts/interfaces/i-pdf-primitives.ts +0 -45
  163. package/dist/ts/interfaces/i-pdf-true-type-font.ts +0 -48
  164. package/dist/ts/interfaces/i-pdf-wrapper.ts +0 -13
  165. package/dist/ts/interfaces/i-pdf-writer.ts +0 -29
@@ -30585,6 +30585,7 @@ var PdfGridRow = /** @__PURE__ @class */ (function () {
30585
30585
  this.isRowMergeComplete = true;
30586
30586
  this.repeatFlag = false;
30587
30587
  this.rowFontSplit = false;
30588
+ this.isHeaderRow = false;
30588
30589
  this.pdfGrid = grid;
30589
30590
  }
30590
30591
  Object.defineProperty(PdfGridRow.prototype, "rowSpanExists", {
@@ -30813,10 +30814,10 @@ var PdfGridRow = /** @__PURE__ @class */ (function () {
30813
30814
  this.rowMergeComplete = false;
30814
30815
  if (cell.rowSpan > 1) {
30815
30816
  var cellIn = i;
30816
- var rowin = this.grid.rows.rowCollection.indexOf(this);
30817
+ var rowin = this.isHeaderRow ? this.grid.headers.indexOf(this) : this.grid.rows.rowCollection.indexOf(this);
30817
30818
  for (var j = 0; j < cell.rowSpan; j++) {
30818
30819
  if ((j + 1) < cell.rowSpan) {
30819
- this.grid.rows.getRow(rowin + j + 1).cells.getCell(cellIn).hasRowSpan = true;
30820
+ (this.isHeaderRow ? this.grid.headers.getHeader(rowin + j + 1) : this.grid.rows.getRow(rowin + j + 1)).cells.getCell(cellIn).hasRowSpan = true;
30820
30821
  }
30821
30822
  }
30822
30823
  if (maxHeight < cell.height) {
@@ -30959,6 +30960,7 @@ var PdfGridHeaderCollection = /** @__PURE__ @class */ (function () {
30959
30960
  var row = void 0;
30960
30961
  for (var i = 0; i < arg; i++) {
30961
30962
  row = new PdfGridRow(this.grid);
30963
+ row.isHeaderRow = true;
30962
30964
  for (var j = 0; j < this.grid.columns.count; j++) {
30963
30965
  row.cells.add(new PdfGridCell());
30964
30966
  }
@@ -31320,6 +31322,20 @@ var PdfGrid = /** @__PURE__ @class */ (function (_super) {
31320
31322
  * @private
31321
31323
  */
31322
31324
  PdfGrid.prototype.layout = function (param) {
31325
+ var width = param.bounds.width;
31326
+ var height = param.bounds.height;
31327
+ var hasChanged = false;
31328
+ if (typeof param.bounds.width === 'undefined' || param.bounds.width === 0) {
31329
+ width = param.page.getClientSize().width - param.bounds.x;
31330
+ hasChanged = true;
31331
+ }
31332
+ if (typeof param.bounds.height === 'undefined' || param.bounds.height === 0) {
31333
+ height = param.page.getClientSize().height - param.bounds.y;
31334
+ hasChanged = true;
31335
+ }
31336
+ if (hasChanged) {
31337
+ param.bounds = new RectangleF(param.bounds.x, param.bounds.y, width, height);
31338
+ }
31323
31339
  if (this.rows.count !== 0) {
31324
31340
  var currentRow = this.rows.getRow(0).cells.getCell(0).style;
31325
31341
  if (currentRow.borders != null && ((currentRow.borders.left != null && currentRow.borders.left.width !== 1) ||
@@ -31935,7 +31951,12 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
31935
31951
  }
31936
31952
  if (!this.Grid.style.allowHorizontalOverflow) {
31937
31953
  this.columnRanges = [];
31938
- this.Grid.measureColumnsWidth(this.currentBounds);
31954
+ if (typeof this.Grid.isChildGrid !== 'undefined' && typeof this.Grid.isChildGrid) {
31955
+ this.Grid.measureColumnsWidth(this.currentBounds);
31956
+ }
31957
+ else {
31958
+ this.Grid.measureColumnsWidth(new RectangleF(this.currentBounds.x, this.currentBounds.y, this.currentBounds.x + this.currentBounds.width, this.currentBounds.height));
31959
+ }
31939
31960
  this.columnRanges.push([0, this.Grid.columns.count - 1]);
31940
31961
  }
31941
31962
  else {
@@ -32321,7 +32342,7 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
32321
32342
  }
32322
32343
  row.grid.splitChildRowIndex = -1;
32323
32344
  row.grid.isGridSplit = false;
32324
- rowResult.isFinish = true;
32345
+ rowResult.isFinish = this.checkIsFisished(row);
32325
32346
  //row.NestedGridLayoutResult.bounds.height = row.rowBreakHeightValue;
32326
32347
  //this.currentBounds.y = rowResult.bounds.y;
32327
32348
  for (var i_4 = 0; i_4 < row.cells.count; i_4++) {
@@ -32380,9 +32401,10 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
32380
32401
  {
32381
32402
  this.currentBounds.y = format == null ? 0 : format.paginateBounds.y;
32382
32403
 
32383
- }
32384
- if (this.raiseBeforePageLayout(this.currentPage, this.currentBounds, this.currentRowIndex))
32385
- break;*/
32404
+ }*/
32405
+ if (this.raiseBeforePageLayout(this.currentPage, this.currentBounds, this.currentRowIndex).returnValue) {
32406
+ break;
32407
+ }
32386
32408
  if ((param.format !== null) && !param.format.usePaginateBounds && param.bounds !== null &&
32387
32409
  param.bounds.height > 0 && !this.Grid.isChildGrid) {
32388
32410
  this.currentBounds.height = param.bounds.height;
@@ -32392,6 +32414,11 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
32392
32414
  }
32393
32415
  else {
32394
32416
  this.currentBounds.y = format == null ? 0 : format.paginateBounds.y;
32417
+ if (format != null && (format.paginateBounds.x !== 0 || format.paginateBounds.y !== 0 || format.paginateBounds.height !== 0 || format.paginateBounds.width !== 0)) {
32418
+ this.currentBounds.x = format.paginateBounds.x;
32419
+ this.currentBounds.width = format.paginateBounds.width;
32420
+ this.currentBounds.height = format.paginateBounds.height;
32421
+ }
32395
32422
  }
32396
32423
  if (typeof param.format !== 'undefined' && (param.format !== null) && typeof param.format.usePaginateBounds !== 'undefined' && !param.format.usePaginateBounds && param.bounds !== null &&
32397
32424
  param.bounds.y > 0 && !this.Grid.isChildGrid) {
@@ -32540,6 +32567,15 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
32540
32567
  this.raisePageLayouted(result);
32541
32568
  return result;
32542
32569
  };
32570
+ PdfGridLayouter.prototype.checkIsFisished = function (row) {
32571
+ var result = true;
32572
+ for (var i = 0; i < row.cells.count; i++) {
32573
+ if (!row.cells.getCell(i).FinishedDrawingCell) {
32574
+ result = false;
32575
+ }
32576
+ }
32577
+ return result;
32578
+ };
32543
32579
  /* tslint:enable */
32544
32580
  /**
32545
32581
  * Gets the `next page`.
@@ -32621,7 +32657,7 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
32621
32657
  for (var i = 0; i < layoutedPages.size(); i++) {
32622
32658
  for (var j = i, count_1 = (layoutedPages.size() / this.columnRanges.length); j < layoutedPages.size(); j += count_1) {
32623
32659
  var page = pages[j];
32624
- if (document.pages.indexOf(page) === -1) {
32660
+ if (typeof page !== 'undefined' && document.pages.indexOf(page) === -1) {
32625
32661
  document.pages.add(page);
32626
32662
  }
32627
32663
  }
@@ -32683,7 +32719,7 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
32683
32719
  // new SizeF(args.Bounds.width + args.Bounds.x ,
32684
32720
  // args.Bounds.height)));
32685
32721
  // }
32686
- cancel = args.cancel;
32722
+ cancel = (typeof args.cancel === 'undefined' ? false : args.cancel);
32687
32723
  currentBounds = args.bounds;
32688
32724
  currentRow = args.startRowIndex;
32689
32725
  }
@@ -32741,7 +32777,7 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
32741
32777
  // }
32742
32778
  }
32743
32779
  var calculatedHeight = row.rowBreakHeight > 0.0 ? row.rowBreakHeight : row.height;
32744
- if (this.Grid.isChildGrid && this.Grid.ParentCell != null) {
32780
+ if (typeof this.Grid.isChildGrid !== 'undefined' && this.Grid.isChildGrid && typeof this.Grid.ParentCell !== 'undefined' && this.Grid.ParentCell != null) {
32745
32781
  //Split row only if row height exceeds page height and AllowRowBreakAcrossPages is true.
32746
32782
  // if (calculatedHeight + this.Grid.ParentCell.row.grid.style.cellPadding.bottom +
32747
32783
  // this.Grid.ParentCell.row.grid.style.cellPadding.top > this.currentPageBounds.height) {
@@ -32771,7 +32807,7 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
32771
32807
  + calculatedHeight > this.currentBounds.height || this.currentBounds.y +
32772
32808
  this.Grid.ParentCell.row.grid.style.cellPadding.bottom + rowHeightWithSpan > this.currentPageBounds.height) {
32773
32809
  //If a row is repeated and still cannot fit in page, proceed draw.
32774
- if (this.Grid.ParentCell.row.grid.LayoutFormat.break === PdfLayoutBreakType.FitPage) {
32810
+ if (typeof this.Grid.ParentCell.row.grid.LayoutFormat !== 'undefined' && this.Grid.ParentCell.row.grid.LayoutFormat.break === PdfLayoutBreakType.FitPage) {
32775
32811
  PdfGridLayouter.repeatRowIndex = this.Grid.rows.rowCollection.indexOf(row);
32776
32812
  this.Grid.splitChildRowIndex = this.Grid.rows.rowCollection.indexOf(row);
32777
32813
  }
@@ -32841,7 +32877,7 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
32841
32877
  // If a row is repeated and still cannot fit in page, proceed draw.
32842
32878
  var isFit = false;
32843
32879
  if ((this.Grid.allowRowBreakAcrossPages && !this.Grid.repeatHeader && !row.isRowHeightSet && !row.rowMergeComplete)) {
32844
- if (this.Grid.LayoutFormat !== null && this.Grid.LayoutFormat.paginateBounds.height > 0 && typeof this.Grid.ParentCell !== 'undefined' && this.Grid.ParentCell !== null && (this.currentBounds.y + this.Grid.ParentCell.row.grid.style.cellPadding.bottom + calculatedHeight) > this.currentBounds.height) {
32880
+ if (this.Grid.LayoutFormat !== null && this.Grid.LayoutFormat.paginateBounds.height > 0) {
32845
32881
  isFit = this.isFitToCell((this.currentBounds.height + this.startLocation.y) - this.currentBounds.y, this.Grid, row);
32846
32882
  }
32847
32883
  else
@@ -32999,7 +33035,18 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
32999
33035
  isFit = false;
33000
33036
  break;
33001
33037
  }
33002
- else if (currentHeight > height || (typeof this.slr.remainder !== 'undefined' && this.slr.remainder !== null)) {
33038
+ if (gridRow.cells.getCell(i).style != null && gridRow.cells.getCell(i).style.borders != null && gridRow.cells.getCell(i).style.borders.top != null && gridRow.cells.getCell(i).style.borders.bottom != null)
33039
+ height += (gridRow.cells.getCell(i).style.borders.top.width + gridRow.cells.getCell(i).style.borders.bottom.width) * 2;
33040
+ if (this.slr.lineCount > 1 && gridRow.cells.getCell(i).stringFormat != null && gridRow.cells.getCell(i).stringFormat.lineSpacing != 0)
33041
+ height += (this.slr.lineCount - 1) * (gridRow.cells.getCell(i).style.stringFormat.lineSpacing);
33042
+ if (gridRow.cells.getCell(i).style.cellPadding == null) {
33043
+ height += (grid.style.cellPadding.top + grid.style.cellPadding.bottom);
33044
+ }
33045
+ else {
33046
+ height += (grid.style.cellPadding.top + grid.style.cellPadding.bottom);
33047
+ }
33048
+ height += grid.style.cellSpacing;
33049
+ if (currentHeight > height || (typeof this.slr.remainder !== 'undefined' && this.slr.remainder !== null)) {
33003
33050
  isFit = true;
33004
33051
  break;
33005
33052
  }
@@ -33063,9 +33110,7 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
33063
33110
  if (stringResult != null && typeof stringResult.remainder !== 'undefined') {
33064
33111
  row.cells.getCell(i).FinishedDrawingCell = false;
33065
33112
  row.cells.getCell(i).remainingString = stringResult.remainder == null ? ' ' : stringResult.remainder;
33066
- if (row.grid.isChildGrid) {
33067
- row.rowBreakHeight = calculateHeight - stringResult.actualSize.height;
33068
- }
33113
+ row.rowBreakHeight = calculateHeight - stringResult.actualSize.height;
33069
33114
  }
33070
33115
  }
33071
33116
  result.isFinish = (!result.isFinish) ? result.isFinish : row.cells.getCell(i).FinishedDrawingCell;