@syncfusion/ej2-pdf-export 29.1.33 → 29.1.41
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 +99 -6
- package/dist/es6/ej2-pdf-export.es2015.js.map +1 -1
- package/dist/es6/ej2-pdf-export.es5.js +99 -6
- 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 +5 -5
- package/src/implementation/graphics/pdf-color.js +8 -2
- package/src/implementation/graphics/pdf-graphics.js +3 -0
- package/src/implementation/structured-elements/grid/layout/grid-layouter.js +85 -1
- package/src/implementation/structured-elements/grid/pdf-grid.d.ts +1 -1
- package/src/implementation/structured-elements/grid/pdf-grid.js +3 -3
|
@@ -3927,10 +3927,16 @@ var PdfColor = /** @__PURE__ @class */ (function () {
|
|
|
3927
3927
|
this.greenColor = g;
|
|
3928
3928
|
this.blueColor = b;
|
|
3929
3929
|
if (typeof a === 'undefined') {
|
|
3930
|
-
this.
|
|
3930
|
+
this.a = PdfColor.maxColourChannelValue;
|
|
3931
3931
|
}
|
|
3932
3932
|
else {
|
|
3933
|
-
this.
|
|
3933
|
+
this.a = a;
|
|
3934
|
+
var isFractional = (a >= 0 && a <= 1);
|
|
3935
|
+
var scaleFactor = isFractional ? a : a / 255;
|
|
3936
|
+
var inverseScale = 1 - scaleFactor;
|
|
3937
|
+
this.redColor = Math.max(0, Math.min(255, Math.round(r * scaleFactor + PdfColor.maxColourChannelValue * inverseScale)));
|
|
3938
|
+
this.greenColor = Math.max(0, Math.min(255, Math.round(g * scaleFactor + PdfColor.maxColourChannelValue * inverseScale)));
|
|
3939
|
+
this.blueColor = Math.max(0, Math.min(255, Math.round(b * scaleFactor + PdfColor.maxColourChannelValue * inverseScale)));
|
|
3934
3940
|
}
|
|
3935
3941
|
this.filled = true;
|
|
3936
3942
|
this.assignCMYK(r, g, b);
|
|
@@ -17442,6 +17448,9 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
|
|
|
17442
17448
|
this.isOverloadWithPosition = false;
|
|
17443
17449
|
this.isPointOverload = true;
|
|
17444
17450
|
}
|
|
17451
|
+
else if (this.isOverloadWithPosition) {
|
|
17452
|
+
this.isOverloadWithPosition = false;
|
|
17453
|
+
}
|
|
17445
17454
|
}
|
|
17446
17455
|
this.getResources.getResources().requireProcedureSet(this.procedureSets.text);
|
|
17447
17456
|
if (vAlignShift !== 0) {
|
|
@@ -32294,7 +32303,7 @@ var PdfGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
32294
32303
|
this.setSpan();
|
|
32295
32304
|
this.checkSpan();
|
|
32296
32305
|
this.layoutFormat = param.format;
|
|
32297
|
-
this.
|
|
32306
|
+
this._gridLocation = param.bounds;
|
|
32298
32307
|
var layouter = new PdfGridLayouter(this);
|
|
32299
32308
|
var result = (layouter.Layouter(param));
|
|
32300
32309
|
return result;
|
|
@@ -32542,8 +32551,8 @@ var PdfGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
32542
32551
|
widths[n] = 0;
|
|
32543
32552
|
}
|
|
32544
32553
|
var cellWidth = 0;
|
|
32545
|
-
if ((typeof this.isChildGrid === 'undefined' && typeof this.
|
|
32546
|
-
this.initialWidth = this.
|
|
32554
|
+
if ((typeof this.isChildGrid === 'undefined' && typeof this._gridLocation !== 'undefined') || (this.isChildGrid === null && typeof this._gridLocation !== 'undefined')) {
|
|
32555
|
+
this.initialWidth = this._gridLocation.width;
|
|
32547
32556
|
}
|
|
32548
32557
|
if (this.headers.count > 0) {
|
|
32549
32558
|
var colCount_1 = this.headers.getHeader(0).cells.count;
|
|
@@ -33705,6 +33714,7 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
|
|
|
33705
33714
|
var rowHeightWithSpan = 0;
|
|
33706
33715
|
var size = new SizeF(0, 0);
|
|
33707
33716
|
var isHeader = false;
|
|
33717
|
+
var allowRowBreak = true;
|
|
33708
33718
|
if (row.rowSpanExists) {
|
|
33709
33719
|
var maxSpan = 0;
|
|
33710
33720
|
var currRowIndex = this.Grid.rows.rowCollection.indexOf(row);
|
|
@@ -33735,7 +33745,90 @@ var PdfGridLayouter = /** @__PURE__ @class */ (function (_super) {
|
|
|
33735
33745
|
// }
|
|
33736
33746
|
// if ((rowMaxHeight > rowHeightWithSpan) && flag) {
|
|
33737
33747
|
// row.height += (rowMaxHeight - rowHeightWithSpan);
|
|
33738
|
-
// }
|
|
33748
|
+
// }
|
|
33749
|
+
if ((rowHeightWithSpan > this.currentBounds.height ||
|
|
33750
|
+
rowHeightWithSpan + this.currentBounds.y > this.currentBounds.height)) {
|
|
33751
|
+
if (row.rowSpanExists &&
|
|
33752
|
+
(this.Grid.LayoutFormat.break === PdfLayoutBreakType.FitElement || !this.Grid.allowRowBreakAcrossPages)) {
|
|
33753
|
+
allowRowBreak = false;
|
|
33754
|
+
}
|
|
33755
|
+
}
|
|
33756
|
+
if ((rowHeightWithSpan > this.currentBounds.height || rowHeightWithSpan + this.currentBounds.y > this.currentBounds.height)
|
|
33757
|
+
&& allowRowBreak) {
|
|
33758
|
+
rowHeightWithSpan = 0;
|
|
33759
|
+
row.isPageBreakRowSpanApplied = true;
|
|
33760
|
+
for (var i = 0; i < row.cells.count; i++) {
|
|
33761
|
+
var cell = row.cells.getCell(i);
|
|
33762
|
+
maxSpan = cell.rowSpan;
|
|
33763
|
+
for (var i_7 = currRowIndex; i_7 < currRowIndex + maxSpan; i_7++) {
|
|
33764
|
+
rowHeightWithSpan += isHeader ? this.Grid.headers.getHeader(i_7).height : this.Grid.rows.getRow(i_7).height;
|
|
33765
|
+
var layoutFormat = this.Grid.LayoutFormat;
|
|
33766
|
+
var currentBoundsHeight = this.currentPageBounds.height;
|
|
33767
|
+
if (layoutFormat.usePaginateBounds && layoutFormat.paginateBounds && layoutFormat.paginateBounds.height > 0) {
|
|
33768
|
+
var bottom = layoutFormat.paginateBounds.y + layoutFormat.paginateBounds.height;
|
|
33769
|
+
if (!this.Grid.isChildGrid && this.Grid.listOfNavigatePages.length === 1) {
|
|
33770
|
+
bottom += this.Grid._gridLocation.y;
|
|
33771
|
+
}
|
|
33772
|
+
if (bottom < currentBoundsHeight) {
|
|
33773
|
+
currentBoundsHeight = bottom;
|
|
33774
|
+
this.currentPageBounds.height = currentBoundsHeight;
|
|
33775
|
+
this.currentBounds.height = currentBoundsHeight;
|
|
33776
|
+
}
|
|
33777
|
+
}
|
|
33778
|
+
if ((this.currentBounds.y + rowHeightWithSpan) > currentBoundsHeight) {
|
|
33779
|
+
rowHeightWithSpan -= isHeader ? this.Grid.headers.getHeader(i_7).height : this.Grid.rows.getRow(i_7).height;
|
|
33780
|
+
for (var j = 0; j < this.Grid.rows.getRow(currRowIndex).cells.count; j++) {
|
|
33781
|
+
var newSpan = i_7 - currRowIndex;
|
|
33782
|
+
if (!isHeader &&
|
|
33783
|
+
this.Grid.rows.getRow(currRowIndex).cells.getCell(j).rowSpan === maxSpan &&
|
|
33784
|
+
newSpan !== 0) {
|
|
33785
|
+
var currCell = this.Grid.rows.getRow(currRowIndex).cells.getCell(j);
|
|
33786
|
+
var nextCell = this.Grid.rows.getRow(i_7).cells.getCell(j);
|
|
33787
|
+
currCell.rowSpan = newSpan === 0 ? 1 : newSpan;
|
|
33788
|
+
this.Grid.rows.getRow(currRowIndex).maximumRowSpan = newSpan === 0 ? 1 : newSpan;
|
|
33789
|
+
nextCell.rowSpan = maxSpan - newSpan;
|
|
33790
|
+
if (this.Grid.rows.getRow(i_7).maximumRowSpan < (maxSpan - newSpan)) {
|
|
33791
|
+
this.Grid.rows.getRow(i_7).maximumRowSpan = maxSpan - newSpan;
|
|
33792
|
+
}
|
|
33793
|
+
var pdfGrid = currCell.value;
|
|
33794
|
+
nextCell.stringFormat = currCell.stringFormat;
|
|
33795
|
+
nextCell.style = currCell.style;
|
|
33796
|
+
nextCell.style.backgroundImage = null;
|
|
33797
|
+
nextCell.columnSpan = currCell.columnSpan;
|
|
33798
|
+
if (pdfGrid instanceof PdfGrid &&
|
|
33799
|
+
this.currentBounds.y + pdfGrid.size.height + this.Grid.rows.getRow(i_7).height +
|
|
33800
|
+
pdfGrid.style.cellPadding.top + pdfGrid.style.cellPadding.bottom >= this.currentBounds.height) {
|
|
33801
|
+
nextCell.value = currCell.value;
|
|
33802
|
+
}
|
|
33803
|
+
else if (!(pdfGrid instanceof PdfGrid)) {
|
|
33804
|
+
nextCell.value = currCell.value;
|
|
33805
|
+
}
|
|
33806
|
+
if (i_7 > 0)
|
|
33807
|
+
this.Grid.rows.getRow(i_7 - 1).rowSpanExists = true;
|
|
33808
|
+
nextCell.isRowMergeContinue = false;
|
|
33809
|
+
nextCell.isRowMergeStart = true;
|
|
33810
|
+
}
|
|
33811
|
+
else if (isHeader &&
|
|
33812
|
+
this.Grid.headers.getHeader(currRowIndex).cells.getCell(j).rowSpan === maxSpan) {
|
|
33813
|
+
var headerCell = this.Grid.headers.getHeader(currRowIndex).cells.getCell(j);
|
|
33814
|
+
var nextHeaderCell = this.Grid.headers.getHeader(i_7).cells.getCell(j);
|
|
33815
|
+
headerCell.rowSpan = newSpan === 0 ? 1 : newSpan;
|
|
33816
|
+
nextHeaderCell.rowSpan = maxSpan - newSpan;
|
|
33817
|
+
nextHeaderCell.stringFormat = headerCell.stringFormat;
|
|
33818
|
+
nextHeaderCell.style = headerCell.style;
|
|
33819
|
+
nextHeaderCell.columnSpan = headerCell.columnSpan;
|
|
33820
|
+
nextHeaderCell.value = headerCell.value;
|
|
33821
|
+
this.Grid.headers.getHeader(i_7 - 1).rowSpanExists = false;
|
|
33822
|
+
nextHeaderCell.isRowMergeContinue = false;
|
|
33823
|
+
nextHeaderCell.isRowMergeStart = true;
|
|
33824
|
+
}
|
|
33825
|
+
}
|
|
33826
|
+
break;
|
|
33827
|
+
}
|
|
33828
|
+
}
|
|
33829
|
+
rowHeightWithSpan = 0;
|
|
33830
|
+
}
|
|
33831
|
+
}
|
|
33739
33832
|
}
|
|
33740
33833
|
var calculatedHeight = row.rowBreakHeight > 0.0 ? row.rowBreakHeight : row.height;
|
|
33741
33834
|
if (typeof this.Grid.isChildGrid !== 'undefined' && this.Grid.isChildGrid && typeof this.Grid.ParentCell !== 'undefined' && this.Grid.ParentCell != null) {
|