@syncfusion/ej2-pdf-export 21.2.3 → 21.2.10

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.
@@ -29644,6 +29644,9 @@ var PdfGridCell = /** @__PURE__ @class */ (function () {
29644
29644
  // If to break row to next page.
29645
29645
  if (this.row.grid.allowRowBreakAcrossPages) {
29646
29646
  innerLayoutArea.height -= innerLayoutArea.y;
29647
+ if (typeof this._rowHeight !== 'undefined' && this._rowHeight !== null && innerLayoutArea.height > this._rowHeight) {
29648
+ innerLayoutArea.height = this._rowHeight;
29649
+ }
29647
29650
  //bounds.height -= bounds.y;
29648
29651
  // if(this.row.grid.isChildGrid)
29649
29652
  // {
@@ -33027,22 +33030,25 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
33027
33030
  else {
33028
33031
  font = PdfDocument.defaultFont;
33029
33032
  }
33030
- this.remainderText = gridRow.cells.getCell(i).value;
33031
- var width = gridRow.cells.getCell(i).width;
33032
- if (grid.columns.getColumn(i).isCustomWidth && gridRow.cells.getCell(i).width > grid.columns.getColumn(i).width) {
33033
- width = grid.columns.getColumn(i).width;
33033
+ this.remainderText = cell.value;
33034
+ var width = cell.width;
33035
+ var column = grid.columns.getColumn(i);
33036
+ if (column.isCustomWidth && cell.width > column.width) {
33037
+ width = column.width;
33034
33038
  }
33035
- this.slr = layouter.layout(gridRow.cells.getCell(i).value, font, gridRow.cells.getCell(i).stringFormat, new SizeF(width, currentHeight), false, this.currentPageBounds);
33039
+ this.slr = layouter.layout(cell.value, font, cell.stringFormat, new SizeF(width, currentHeight), false, this.currentPageBounds);
33036
33040
  var height = this.slr.actualSize.height;
33037
- if (height == 0) {
33041
+ if (cell.value !== '' && height === 0) {
33038
33042
  isFit = false;
33039
33043
  break;
33040
33044
  }
33041
- 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)
33042
- height += (gridRow.cells.getCell(i).style.borders.top.width + gridRow.cells.getCell(i).style.borders.bottom.width) * 2;
33043
- if (this.slr.lineCount > 1 && gridRow.cells.getCell(i).stringFormat != null && gridRow.cells.getCell(i).stringFormat.lineSpacing != 0)
33044
- height += (this.slr.lineCount - 1) * (gridRow.cells.getCell(i).style.stringFormat.lineSpacing);
33045
- if (gridRow.cells.getCell(i).style.cellPadding == null) {
33045
+ if (cell.style !== null && cell.style.borders !== null && cell.style.borders.top !== null && cell.style.borders.bottom !== null) {
33046
+ height += (cell.style.borders.top.width + cell.style.borders.bottom.width) * 2;
33047
+ }
33048
+ if (this.slr.lineCount > 1 && cell.stringFormat != null && cell.stringFormat.lineSpacing != 0) {
33049
+ height += (this.slr.lineCount - 1) * (cell.style.stringFormat.lineSpacing);
33050
+ }
33051
+ if (cell.style.cellPadding === null) {
33046
33052
  height += (grid.style.cellPadding.top + grid.style.cellPadding.bottom);
33047
33053
  }
33048
33054
  else {
@@ -33106,6 +33112,7 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
33106
33112
  var skipcell = false;
33107
33113
  var stringResult = null;
33108
33114
  if (!skipcell) {
33115
+ row.cells.getCell(i)._rowHeight = row.height;
33109
33116
  stringResult = row.cells.getCell(i).draw(this.currentGraphics, new RectangleF(location, size), cancelSpans);
33110
33117
  }
33111
33118
  //If still row is to be drawn, set cell finished drawing cell as false and update the text to be drawn.