@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.
@@ -27596,10 +27596,14 @@ class PdfGridCell {
27596
27596
  else {
27597
27597
  returnBounds.x += this.style.borders.left.width;
27598
27598
  returnBounds.y += this.style.borders.top.width;
27599
- returnBounds.width -= (this.style.borders.left.width + this.style.borders.right.width);
27600
27599
  returnBounds.height -= (this.style.borders.top.width + this.style.borders.bottom.width);
27601
- if (this.rowSpan === 1) {
27602
- returnBounds.width -= (this.style.borders.left.width);
27600
+ const format = this.getStringFormat();
27601
+ if (typeof format.alignment !== 'undefined' && format.alignment !== null && format.alignment !== PdfTextAlignment.Left
27602
+ || !this._isDefalutBorderWidth(this.style.borders)) {
27603
+ returnBounds.width -= (this.style.borders.left.width + this.style.borders.right.width);
27604
+ if (this.rowSpan === 1) {
27605
+ returnBounds.width -= (this.style.borders.left.width);
27606
+ }
27603
27607
  }
27604
27608
  }
27605
27609
  }
@@ -27663,6 +27667,22 @@ class PdfGridCell {
27663
27667
  }
27664
27668
  return returnBounds;
27665
27669
  }
27670
+ /**
27671
+ * Determines whether all borders have the default border width.
27672
+ *
27673
+ * @private
27674
+ * @param {PdfBorders} borders The borders object containing width information
27675
+ * for each side of the element.
27676
+ * @returns {boolean} Returns true if the left, bottom, top, and right borders
27677
+ * all have a width equal to the default border width; otherwise, false.
27678
+ */
27679
+ _isDefalutBorderWidth(borders) {
27680
+ const defaultBorderWidth = 1;
27681
+ return (borders.left.width === defaultBorderWidth &&
27682
+ borders.bottom.width === defaultBorderWidth &&
27683
+ borders.top.width === defaultBorderWidth &&
27684
+ borders.right.width === defaultBorderWidth);
27685
+ }
27666
27686
  /**
27667
27687
  * `Draws` the specified graphics.
27668
27688
  * @private
@@ -27731,10 +27751,9 @@ class PdfGridCell {
27731
27751
  innerLayoutArea.height = this._rowHeight;
27732
27752
  }
27733
27753
  //bounds.height -= bounds.y;
27734
- // if(this.row.grid.isChildGrid)
27735
- // {
27736
- // innerLayoutArea.height -= this.row.grid.ParentCell.row.grid.style.cellPadding.bottom;
27737
- // }
27754
+ if (this.row.grid.isChildGrid) {
27755
+ innerLayoutArea.height -= this.row.grid.ParentCell.row.grid.style.cellPadding.bottom;
27756
+ }
27738
27757
  }
27739
27758
  // if user choose to cut the row whose height is more than page height.
27740
27759
  // else