@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 33.1.44
3
+ * version : 33.2.4
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-pdf-export",
3
- "version": "33.1.44",
3
+ "version": "33.2.4",
4
4
  "description": "Syncfusion TypeScript Component",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -9,7 +9,7 @@
9
9
  "es2015": "./dist/es6/ej2-pdf-export.es5.js",
10
10
  "devDependencies": {},
11
11
  "dependencies": {
12
- "@syncfusion/ej2-compression": "~33.1.44"
12
+ "@syncfusion/ej2-compression": "~33.2.3"
13
13
  },
14
14
  "typings": "index.d.ts",
15
15
  "sideEffects": false,
@@ -7,6 +7,7 @@ import { PdfStringLayoutResult } from './../../graphics/fonts/string-layouter';
7
7
  import { PdfStringFormat } from './../../graphics/fonts/pdf-string-format';
8
8
  import { RectangleF } from './../../drawing/pdf-drawing';
9
9
  import { PdfGraphics } from './../../graphics/pdf-graphics';
10
+ import { PdfBorders } from './styles/pdf-borders';
10
11
  /**
11
12
  * `PdfGridCell` class represents the schema of a cell in a 'PdfGrid'.
12
13
  */
@@ -183,6 +184,16 @@ export declare class PdfGridCell {
183
184
  * @private
184
185
  */
185
186
  private adjustContentLayoutArea;
187
+ /**
188
+ * Determines whether all borders have the default border width.
189
+ *
190
+ * @private
191
+ * @param {PdfBorders} borders The borders object containing width information
192
+ * for each side of the element.
193
+ * @returns {boolean} Returns true if the left, bottom, top, and right borders
194
+ * all have a width equal to the default border width; otherwise, false.
195
+ */
196
+ _isDefalutBorderWidth(borders: PdfBorders): boolean;
186
197
  /**
187
198
  * `Draws` the specified graphics.
188
199
  * @private
@@ -4,7 +4,7 @@ import { PdfStringLayouter } from './../../graphics/fonts/string-layouter';
4
4
  import { PdfDocument } from './../../document/pdf-document';
5
5
  import { PdfStringFormat } from './../../graphics/fonts/pdf-string-format';
6
6
  import { RectangleF, PointF, SizeF } from './../../drawing/pdf-drawing';
7
- import { PdfDashStyle, PdfLineCap } from './../../graphics/enum';
7
+ import { PdfDashStyle, PdfLineCap, PdfTextAlignment } from './../../graphics/enum';
8
8
  import { PdfBorderOverlapStyle } from './../tables/light-tables/enum';
9
9
  import { PdfSolidBrush } from './../../graphics/brushes/pdf-solid-brush';
10
10
  import { PdfColor } from './../../graphics/pdf-color';
@@ -398,10 +398,14 @@ var PdfGridCell = /** @class */ (function () {
398
398
  else {
399
399
  returnBounds.x += this.style.borders.left.width;
400
400
  returnBounds.y += this.style.borders.top.width;
401
- returnBounds.width -= (this.style.borders.left.width + this.style.borders.right.width);
402
401
  returnBounds.height -= (this.style.borders.top.width + this.style.borders.bottom.width);
403
- if (this.rowSpan === 1) {
404
- returnBounds.width -= (this.style.borders.left.width);
402
+ var format = this.getStringFormat();
403
+ if (typeof format.alignment !== 'undefined' && format.alignment !== null && format.alignment !== PdfTextAlignment.Left
404
+ || !this._isDefalutBorderWidth(this.style.borders)) {
405
+ returnBounds.width -= (this.style.borders.left.width + this.style.borders.right.width);
406
+ if (this.rowSpan === 1) {
407
+ returnBounds.width -= (this.style.borders.left.width);
408
+ }
405
409
  }
406
410
  }
407
411
  }
@@ -465,6 +469,22 @@ var PdfGridCell = /** @class */ (function () {
465
469
  }
466
470
  return returnBounds;
467
471
  };
472
+ /**
473
+ * Determines whether all borders have the default border width.
474
+ *
475
+ * @private
476
+ * @param {PdfBorders} borders The borders object containing width information
477
+ * for each side of the element.
478
+ * @returns {boolean} Returns true if the left, bottom, top, and right borders
479
+ * all have a width equal to the default border width; otherwise, false.
480
+ */
481
+ PdfGridCell.prototype._isDefalutBorderWidth = function (borders) {
482
+ var defaultBorderWidth = 1;
483
+ return (borders.left.width === defaultBorderWidth &&
484
+ borders.bottom.width === defaultBorderWidth &&
485
+ borders.top.width === defaultBorderWidth &&
486
+ borders.right.width === defaultBorderWidth);
487
+ };
468
488
  /**
469
489
  * `Draws` the specified graphics.
470
490
  * @private
@@ -534,10 +554,9 @@ var PdfGridCell = /** @class */ (function () {
534
554
  innerLayoutArea.height = this._rowHeight;
535
555
  }
536
556
  //bounds.height -= bounds.y;
537
- // if(this.row.grid.isChildGrid)
538
- // {
539
- // innerLayoutArea.height -= this.row.grid.ParentCell.row.grid.style.cellPadding.bottom;
540
- // }
557
+ if (this.row.grid.isChildGrid) {
558
+ innerLayoutArea.height -= this.row.grid.ParentCell.row.grid.style.cellPadding.bottom;
559
+ }
541
560
  }
542
561
  // if user choose to cut the row whose height is more than page height.
543
562
  // else