@syncfusion/ej2-pdf-export 26.2.11 → 26.2.14

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.
@@ -21187,10 +21187,8 @@ class PdfPaddings {
21187
21187
  */
21188
21188
  this.hasBottomPad = false;
21189
21189
  if (typeof left === 'undefined') {
21190
- //5.76 and 0 are taken from ms-word default table margins.
21191
- this.leftPad = this.rightPad = 5.76;
21192
21190
  //0.5 is set for top and bottom by default.
21193
- this.bottomPad = this.topPad = 0.5;
21191
+ this.bottomPad = this.topPad = this.leftPad = this.rightPad = 0.5;
21194
21192
  }
21195
21193
  else {
21196
21194
  this.leftPad = left;
@@ -26732,10 +26730,6 @@ class PdfGridStyle extends PdfGridStyleBase {
26732
26730
  */
26733
26731
  constructor() {
26734
26732
  super();
26735
- /**
26736
- * @private
26737
- */
26738
- this._isDefaultPadding = false;
26739
26733
  this.gridBorderOverlapStyle = PdfBorderOverlapStyle.Overlap;
26740
26734
  this.bAllowHorizontalOverflow = false;
26741
26735
  this.gridHorizontalOverflowType = PdfHorizontalOverflowType.LastPage;
@@ -26781,7 +26775,6 @@ class PdfGridStyle extends PdfGridStyleBase {
26781
26775
  get cellPadding() {
26782
26776
  if (typeof this.gridCellPadding === 'undefined') {
26783
26777
  this.gridCellPadding = new PdfPaddings();
26784
- this._isDefaultPadding = true;
26785
26778
  }
26786
26779
  return this.gridCellPadding;
26787
26780
  }
@@ -26793,7 +26786,6 @@ class PdfGridStyle extends PdfGridStyleBase {
26793
26786
  else {
26794
26787
  this.gridCellPadding = value;
26795
26788
  }
26796
- this._isDefaultPadding = false;
26797
26789
  }
26798
26790
  /**
26799
26791
  * Gets or sets the `border overlap style` of the 'PdfGrid'.
@@ -30063,7 +30055,11 @@ class PdfGridLayouter extends ElementLayouter {
30063
30055
  let cell = row.cells.getCell(c);
30064
30056
  let cellWidth = 0;
30065
30057
  let totalwidth = 0;
30058
+ let childGridCell;
30066
30059
  if (cell.value instanceof PdfGrid) {
30060
+ if (!childGridCell) {
30061
+ childGridCell = cell;
30062
+ }
30067
30063
  for (let i = 0; i < cell.value.columns.count; i++) {
30068
30064
  totalwidth += cell.value.columns.getColumn(i).columnWidth;
30069
30065
  }
@@ -30077,13 +30073,16 @@ class PdfGridLayouter extends ElementLayouter {
30077
30073
  }
30078
30074
  else
30079
30075
  cellWidth = Math.max(totalwidth, row.grid.columns.getColumn(c).width);
30080
- if (!this.Grid.style._isDefaultPadding) {
30081
- let bottomPadding = this.Grid.style.cellPadding.top + this.Grid.style.cellPadding.bottom;
30082
- bottomPadding += cell.style.borders.top.width + cell.style.borders.bottom.width;
30083
- if ((height + bottomPadding) < pageGraphics.clientSize.height) {
30084
- height += bottomPadding;
30085
- this.currentBounds.y += bottomPadding;
30086
- }
30076
+ let bottomPadding;
30077
+ if (childGridCell && childGridCell.style && childGridCell.style.cellPadding) {
30078
+ bottomPadding = childGridCell.style.cellPadding.bottom;
30079
+ }
30080
+ else {
30081
+ bottomPadding = this.Grid.style.cellPadding.bottom;
30082
+ }
30083
+ if (typeof bottomPadding === 'number' && (height + bottomPadding) < pageGraphics.clientSize.height) {
30084
+ height += bottomPadding;
30085
+ this.currentBounds.y += bottomPadding;
30087
30086
  }
30088
30087
  cell.drawCellBorders(pageGraphics, new RectangleF(location, new SizeF(cellWidth, height)));
30089
30088
  const rowWidth = this.Grid.rows.getRow(this.Grid.rows.count - 1).width;