@syncfusion/ej2-pdf-export 33.1.44 → 33.2.4

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.
@@ -30633,10 +30633,14 @@ var PdfGridCell = /** @__PURE__ @class */ (function () {
30633
30633
  else {
30634
30634
  returnBounds.x += this.style.borders.left.width;
30635
30635
  returnBounds.y += this.style.borders.top.width;
30636
- returnBounds.width -= (this.style.borders.left.width + this.style.borders.right.width);
30637
30636
  returnBounds.height -= (this.style.borders.top.width + this.style.borders.bottom.width);
30638
- if (this.rowSpan === 1) {
30639
- returnBounds.width -= (this.style.borders.left.width);
30637
+ var format = this.getStringFormat();
30638
+ if (typeof format.alignment !== 'undefined' && format.alignment !== null && format.alignment !== PdfTextAlignment.Left
30639
+ || !this._isDefalutBorderWidth(this.style.borders)) {
30640
+ returnBounds.width -= (this.style.borders.left.width + this.style.borders.right.width);
30641
+ if (this.rowSpan === 1) {
30642
+ returnBounds.width -= (this.style.borders.left.width);
30643
+ }
30640
30644
  }
30641
30645
  }
30642
30646
  }
@@ -30700,6 +30704,22 @@ var PdfGridCell = /** @__PURE__ @class */ (function () {
30700
30704
  }
30701
30705
  return returnBounds;
30702
30706
  };
30707
+ /**
30708
+ * Determines whether all borders have the default border width.
30709
+ *
30710
+ * @private
30711
+ * @param {PdfBorders} borders The borders object containing width information
30712
+ * for each side of the element.
30713
+ * @returns {boolean} Returns true if the left, bottom, top, and right borders
30714
+ * all have a width equal to the default border width; otherwise, false.
30715
+ */
30716
+ PdfGridCell.prototype._isDefalutBorderWidth = function (borders) {
30717
+ var defaultBorderWidth = 1;
30718
+ return (borders.left.width === defaultBorderWidth &&
30719
+ borders.bottom.width === defaultBorderWidth &&
30720
+ borders.top.width === defaultBorderWidth &&
30721
+ borders.right.width === defaultBorderWidth);
30722
+ };
30703
30723
  /**
30704
30724
  * `Draws` the specified graphics.
30705
30725
  * @private
@@ -30768,10 +30788,9 @@ var PdfGridCell = /** @__PURE__ @class */ (function () {
30768
30788
  innerLayoutArea.height = this._rowHeight;
30769
30789
  }
30770
30790
  //bounds.height -= bounds.y;
30771
- // if(this.row.grid.isChildGrid)
30772
- // {
30773
- // innerLayoutArea.height -= this.row.grid.ParentCell.row.grid.style.cellPadding.bottom;
30774
- // }
30791
+ if (this.row.grid.isChildGrid) {
30792
+ innerLayoutArea.height -= this.row.grid.ParentCell.row.grid.style.cellPadding.bottom;
30793
+ }
30775
30794
  }
30776
30795
  // if user choose to cut the row whose height is more than page height.
30777
30796
  // else