@syncfusion/ej2-pdf-export 26.2.14 → 27.1.50

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.
@@ -30328,19 +30328,41 @@ var PdfGridCell = /** @__PURE__ @class */ (function () {
30328
30328
  }
30329
30329
  else {
30330
30330
  if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
30331
- if (typeof this.gridRow.grid.style.cellPadding.left !== 'undefined' && this.gridRow.grid.style.cellPadding.hasLeftPad) {
30332
- returnBounds.x += this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width;
30333
- returnBounds.width -= this.gridRow.grid.style.cellPadding.left;
30334
- }
30335
- if (typeof this.gridRow.grid.style.cellPadding.top !== 'undefined' && this.gridRow.grid.style.cellPadding.hasTopPad) {
30336
- returnBounds.y += this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width;
30337
- returnBounds.height -= this.gridRow.grid.style.cellPadding.top;
30338
- }
30339
- if (typeof this.gridRow.grid.style.cellPadding.right !== 'undefined' && this.gridRow.grid.style.cellPadding.hasRightPad) {
30340
- returnBounds.width -= this.gridRow.grid.style.cellPadding.right;
30331
+ if (this.gridRow.grid.style.cellPadding !== null && typeof this.gridRow.grid.style.cellPadding !== 'undefined') {
30332
+ var hasLeftPad = this.gridRow.grid.style.cellPadding.hasLeftPad;
30333
+ var hasTopPad = this.gridRow.grid.style.cellPadding.hasTopPad;
30334
+ var hasRightPad = this.gridRow.grid.style.cellPadding.hasRightPad;
30335
+ var hasBottomPad = this.gridRow.grid.style.cellPadding.hasBottomPad;
30336
+ if (hasLeftPad || hasTopPad || hasRightPad || hasBottomPad) {
30337
+ if (typeof this.gridRow.grid.style.cellPadding.left !== 'undefined' && hasLeftPad) {
30338
+ returnBounds.x += this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width;
30339
+ returnBounds.width -= this.gridRow.grid.style.cellPadding.left;
30340
+ }
30341
+ if (typeof this.gridRow.grid.style.cellPadding.top !== 'undefined' && hasTopPad) {
30342
+ returnBounds.y += this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width;
30343
+ returnBounds.height -= this.gridRow.grid.style.cellPadding.top;
30344
+ }
30345
+ if (typeof this.gridRow.grid.style.cellPadding.right !== 'undefined' && hasRightPad) {
30346
+ returnBounds.width -= this.gridRow.grid.style.cellPadding.right;
30347
+ }
30348
+ if (typeof this.gridRow.grid.style.cellPadding.bottom !== 'undefined' && hasBottomPad) {
30349
+ returnBounds.height -= this.gridRow.grid.style.cellPadding.bottom;
30350
+ }
30351
+ }
30352
+ else {
30353
+ var format = this.getStringFormat();
30354
+ if (format.alignment === null || typeof format.alignment === 'undefined') {
30355
+ returnBounds.x += this.row.grid.style.cellPadding.left;
30356
+ returnBounds.y += this.row.grid.style.cellPadding.top;
30357
+ }
30358
+ }
30341
30359
  }
30342
- if (typeof this.gridRow.grid.style.cellPadding.bottom !== 'undefined' && this.gridRow.grid.style.cellPadding.hasBottomPad) {
30343
- returnBounds.height -= this.gridRow.grid.style.cellPadding.bottom;
30360
+ else {
30361
+ var format = this.getStringFormat();
30362
+ if (format.alignment === null || typeof format.alignment === 'undefined') {
30363
+ returnBounds.x += this.row.grid.style.cellPadding.left;
30364
+ returnBounds.y += this.row.grid.style.cellPadding.top;
30365
+ }
30344
30366
  }
30345
30367
  }
30346
30368
  else {
@@ -30564,12 +30586,13 @@ var PdfGridCell = /** @__PURE__ @class */ (function () {
30564
30586
  }
30565
30587
  }
30566
30588
  else if (this.objectValue instanceof PdfImage || this.objectValue instanceof PdfBitmap) {
30567
- var imageBounds = void 0;
30568
- if (this.objectValue.width <= innerLayoutArea.width) {
30569
- imageBounds = new RectangleF(innerLayoutArea.x, innerLayoutArea.y, this.objectValue.width, innerLayoutArea.height);
30589
+ var imageBounds = new RectangleF(innerLayoutArea.x, innerLayoutArea.y, innerLayoutArea.width, innerLayoutArea.height);
30590
+ var image = this.objectValue;
30591
+ if (image.width <= innerLayoutArea.width) {
30592
+ imageBounds.width = image.width;
30570
30593
  }
30571
- else {
30572
- imageBounds = innerLayoutArea;
30594
+ if (image.height <= innerLayoutArea.height) {
30595
+ imageBounds.height = image.height;
30573
30596
  }
30574
30597
  graphics.drawImage(this.objectValue, imageBounds.x, imageBounds.y, imageBounds.width, imageBounds.height);
30575
30598
  }