@syncfusion/ej2-pdf-export 26.2.11 → 27.1.48
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.
- package/dist/ej2-pdf-export.min.js +2 -2
- package/dist/ej2-pdf-export.umd.min.js +2 -2
- package/dist/ej2-pdf-export.umd.min.js.map +1 -1
- package/dist/es6/ej2-pdf-export.es2015.js +55 -33
- package/dist/es6/ej2-pdf-export.es2015.js.map +1 -1
- package/dist/es6/ej2-pdf-export.es5.js +55 -33
- package/dist/es6/ej2-pdf-export.es5.js.map +1 -1
- package/dist/global/ej2-pdf-export.min.js +2 -2
- package/dist/global/ej2-pdf-export.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -7
- package/src/implementation/structured-elements/grid/layout/grid-layouter.js +14 -7
- package/src/implementation/structured-elements/grid/pdf-grid-cell.js +40 -17
- package/src/implementation/structured-elements/grid/styles/pdf-borders.js +1 -3
- package/src/implementation/structured-elements/grid/styles/style.d.ts +0 -4
- package/src/implementation/structured-elements/grid/styles/style.js +0 -6
|
@@ -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'.
|
|
@@ -27313,19 +27305,41 @@ class PdfGridCell {
|
|
|
27313
27305
|
}
|
|
27314
27306
|
else {
|
|
27315
27307
|
if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
|
|
27316
|
-
if (
|
|
27317
|
-
|
|
27318
|
-
|
|
27319
|
-
|
|
27320
|
-
|
|
27321
|
-
|
|
27322
|
-
|
|
27323
|
-
|
|
27324
|
-
|
|
27325
|
-
|
|
27308
|
+
if (this.gridRow.grid.style.cellPadding !== null && typeof this.gridRow.grid.style.cellPadding !== 'undefined') {
|
|
27309
|
+
const hasLeftPad = this.gridRow.grid.style.cellPadding.hasLeftPad;
|
|
27310
|
+
const hasTopPad = this.gridRow.grid.style.cellPadding.hasTopPad;
|
|
27311
|
+
const hasRightPad = this.gridRow.grid.style.cellPadding.hasRightPad;
|
|
27312
|
+
const hasBottomPad = this.gridRow.grid.style.cellPadding.hasBottomPad;
|
|
27313
|
+
if (hasLeftPad || hasTopPad || hasRightPad || hasBottomPad) {
|
|
27314
|
+
if (typeof this.gridRow.grid.style.cellPadding.left !== 'undefined' && hasLeftPad) {
|
|
27315
|
+
returnBounds.x += this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width;
|
|
27316
|
+
returnBounds.width -= this.gridRow.grid.style.cellPadding.left;
|
|
27317
|
+
}
|
|
27318
|
+
if (typeof this.gridRow.grid.style.cellPadding.top !== 'undefined' && hasTopPad) {
|
|
27319
|
+
returnBounds.y += this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width;
|
|
27320
|
+
returnBounds.height -= this.gridRow.grid.style.cellPadding.top;
|
|
27321
|
+
}
|
|
27322
|
+
if (typeof this.gridRow.grid.style.cellPadding.right !== 'undefined' && hasRightPad) {
|
|
27323
|
+
returnBounds.width -= this.gridRow.grid.style.cellPadding.right;
|
|
27324
|
+
}
|
|
27325
|
+
if (typeof this.gridRow.grid.style.cellPadding.bottom !== 'undefined' && hasBottomPad) {
|
|
27326
|
+
returnBounds.height -= this.gridRow.grid.style.cellPadding.bottom;
|
|
27327
|
+
}
|
|
27328
|
+
}
|
|
27329
|
+
else {
|
|
27330
|
+
const format = this.getStringFormat();
|
|
27331
|
+
if (format.alignment === null || typeof format.alignment === 'undefined') {
|
|
27332
|
+
returnBounds.x += this.row.grid.style.cellPadding.left;
|
|
27333
|
+
returnBounds.y += this.row.grid.style.cellPadding.top;
|
|
27334
|
+
}
|
|
27335
|
+
}
|
|
27326
27336
|
}
|
|
27327
|
-
|
|
27328
|
-
|
|
27337
|
+
else {
|
|
27338
|
+
const format = this.getStringFormat();
|
|
27339
|
+
if (format.alignment === null || typeof format.alignment === 'undefined') {
|
|
27340
|
+
returnBounds.x += this.row.grid.style.cellPadding.left;
|
|
27341
|
+
returnBounds.y += this.row.grid.style.cellPadding.top;
|
|
27342
|
+
}
|
|
27329
27343
|
}
|
|
27330
27344
|
}
|
|
27331
27345
|
else {
|
|
@@ -27549,12 +27563,13 @@ class PdfGridCell {
|
|
|
27549
27563
|
}
|
|
27550
27564
|
}
|
|
27551
27565
|
else if (this.objectValue instanceof PdfImage || this.objectValue instanceof PdfBitmap) {
|
|
27552
|
-
|
|
27553
|
-
|
|
27554
|
-
|
|
27566
|
+
const imageBounds = new RectangleF(innerLayoutArea.x, innerLayoutArea.y, innerLayoutArea.width, innerLayoutArea.height);
|
|
27567
|
+
const image = this.objectValue;
|
|
27568
|
+
if (image.width <= innerLayoutArea.width) {
|
|
27569
|
+
imageBounds.width = image.width;
|
|
27555
27570
|
}
|
|
27556
|
-
|
|
27557
|
-
imageBounds =
|
|
27571
|
+
if (image.height <= innerLayoutArea.height) {
|
|
27572
|
+
imageBounds.height = image.height;
|
|
27558
27573
|
}
|
|
27559
27574
|
graphics.drawImage(this.objectValue, imageBounds.x, imageBounds.y, imageBounds.width, imageBounds.height);
|
|
27560
27575
|
}
|
|
@@ -30063,7 +30078,11 @@ class PdfGridLayouter extends ElementLayouter {
|
|
|
30063
30078
|
let cell = row.cells.getCell(c);
|
|
30064
30079
|
let cellWidth = 0;
|
|
30065
30080
|
let totalwidth = 0;
|
|
30081
|
+
let childGridCell;
|
|
30066
30082
|
if (cell.value instanceof PdfGrid) {
|
|
30083
|
+
if (!childGridCell) {
|
|
30084
|
+
childGridCell = cell;
|
|
30085
|
+
}
|
|
30067
30086
|
for (let i = 0; i < cell.value.columns.count; i++) {
|
|
30068
30087
|
totalwidth += cell.value.columns.getColumn(i).columnWidth;
|
|
30069
30088
|
}
|
|
@@ -30077,13 +30096,16 @@ class PdfGridLayouter extends ElementLayouter {
|
|
|
30077
30096
|
}
|
|
30078
30097
|
else
|
|
30079
30098
|
cellWidth = Math.max(totalwidth, row.grid.columns.getColumn(c).width);
|
|
30080
|
-
|
|
30081
|
-
|
|
30082
|
-
bottomPadding
|
|
30083
|
-
|
|
30084
|
-
|
|
30085
|
-
|
|
30086
|
-
|
|
30099
|
+
let bottomPadding;
|
|
30100
|
+
if (childGridCell && childGridCell.style && childGridCell.style.cellPadding) {
|
|
30101
|
+
bottomPadding = childGridCell.style.cellPadding.bottom;
|
|
30102
|
+
}
|
|
30103
|
+
else {
|
|
30104
|
+
bottomPadding = this.Grid.style.cellPadding.bottom;
|
|
30105
|
+
}
|
|
30106
|
+
if (typeof bottomPadding === 'number' && (height + bottomPadding) < pageGraphics.clientSize.height) {
|
|
30107
|
+
height += bottomPadding;
|
|
30108
|
+
this.currentBounds.y += bottomPadding;
|
|
30087
30109
|
}
|
|
30088
30110
|
cell.drawCellBorders(pageGraphics, new RectangleF(location, new SizeF(cellWidth, height)));
|
|
30089
30111
|
const rowWidth = this.Grid.rows.getRow(this.Grid.rows.count - 1).width;
|