@syncfusion/ej2-pdf-export 23.1.43 → 23.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.
- package/CHANGELOG.md +8 -0
- 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 +20 -16
- package/dist/es6/ej2-pdf-export.es2015.js.map +1 -1
- package/dist/es6/ej2-pdf-export.es5.js +20 -16
- 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 +6 -7
- package/src/implementation/pages/pdf-page-template-element.d.ts +5 -0
- package/src/implementation/pages/pdf-page-template-element.js +20 -16
|
@@ -35935,9 +35935,6 @@ var PdfPageTemplateElement = /** @__PURE__ @class */ (function () {
|
|
|
35935
35935
|
PdfPageTemplateElement.prototype.draw = function (layer, document) {
|
|
35936
35936
|
var page = layer.page;
|
|
35937
35937
|
var bounds = this.calculateBounds(page, document);
|
|
35938
|
-
if (bounds.x === -0) {
|
|
35939
|
-
bounds.x = 0;
|
|
35940
|
-
}
|
|
35941
35938
|
layer.graphics.drawPdfTemplate(this.template, new PointF(bounds.x, bounds.y), new SizeF(bounds.width, bounds.height));
|
|
35942
35939
|
};
|
|
35943
35940
|
/**
|
|
@@ -36033,17 +36030,17 @@ var PdfPageTemplateElement = /** @__PURE__ @class */ (function () {
|
|
|
36033
36030
|
switch (this.alignmentStyle) {
|
|
36034
36031
|
case PdfAlignmentStyle.TopLeft:
|
|
36035
36032
|
if (this.type === TemplateType.Left) {
|
|
36036
|
-
x =
|
|
36033
|
+
x = this.convertSign(actualBounds.x);
|
|
36037
36034
|
y = 0;
|
|
36038
36035
|
}
|
|
36039
36036
|
else if (this.type === TemplateType.Top) {
|
|
36040
|
-
x =
|
|
36041
|
-
y =
|
|
36037
|
+
x = this.convertSign(actualBounds.x);
|
|
36038
|
+
y = this.convertSign(actualBounds.y);
|
|
36042
36039
|
}
|
|
36043
36040
|
break;
|
|
36044
36041
|
case PdfAlignmentStyle.TopCenter:
|
|
36045
36042
|
x = (actualBounds.width - this.width) / 2;
|
|
36046
|
-
y =
|
|
36043
|
+
y = this.convertSign(actualBounds.y);
|
|
36047
36044
|
break;
|
|
36048
36045
|
case PdfAlignmentStyle.TopRight:
|
|
36049
36046
|
if (this.type === TemplateType.Right) {
|
|
@@ -36052,11 +36049,11 @@ var PdfPageTemplateElement = /** @__PURE__ @class */ (function () {
|
|
|
36052
36049
|
}
|
|
36053
36050
|
else if (this.type === TemplateType.Top) {
|
|
36054
36051
|
x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;
|
|
36055
|
-
y =
|
|
36052
|
+
y = this.convertSign(actualBounds.y);
|
|
36056
36053
|
}
|
|
36057
36054
|
break;
|
|
36058
36055
|
case PdfAlignmentStyle.MiddleLeft:
|
|
36059
|
-
x =
|
|
36056
|
+
x = this.convertSign(actualBounds.x);
|
|
36060
36057
|
y = (actualBounds.height - this.height) / 2;
|
|
36061
36058
|
break;
|
|
36062
36059
|
case PdfAlignmentStyle.MiddleCenter:
|
|
@@ -36069,11 +36066,11 @@ var PdfPageTemplateElement = /** @__PURE__ @class */ (function () {
|
|
|
36069
36066
|
break;
|
|
36070
36067
|
case PdfAlignmentStyle.BottomLeft:
|
|
36071
36068
|
if (this.type === TemplateType.Left) {
|
|
36072
|
-
x =
|
|
36069
|
+
x = this.convertSign(actualBounds.x);
|
|
36073
36070
|
y = actualBounds.height - this.height;
|
|
36074
36071
|
}
|
|
36075
36072
|
else if (this.type === TemplateType.Bottom) {
|
|
36076
|
-
x =
|
|
36073
|
+
x = this.convertSign(actualBounds.x);
|
|
36077
36074
|
y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;
|
|
36078
36075
|
}
|
|
36079
36076
|
break;
|
|
@@ -36172,18 +36169,18 @@ var PdfPageTemplateElement = /** @__PURE__ @class */ (function () {
|
|
|
36172
36169
|
var height = this.height;
|
|
36173
36170
|
switch (this.dockStyle) {
|
|
36174
36171
|
case PdfDockStyle.Left:
|
|
36175
|
-
x =
|
|
36172
|
+
x = this.convertSign(actualBounds.x);
|
|
36176
36173
|
y = 0;
|
|
36177
36174
|
width = this.width;
|
|
36178
36175
|
height = actualBounds.height;
|
|
36179
36176
|
break;
|
|
36180
36177
|
case PdfDockStyle.Top:
|
|
36181
|
-
x =
|
|
36182
|
-
y =
|
|
36178
|
+
x = this.convertSign(actualBounds.x);
|
|
36179
|
+
y = this.convertSign(actualBounds.y);
|
|
36183
36180
|
width = actualSize.width;
|
|
36184
36181
|
height = this.height;
|
|
36185
36182
|
if (actualBounds.height < 0) {
|
|
36186
|
-
y = -actualBounds.y
|
|
36183
|
+
y = actualSize.height - actualBounds.y;
|
|
36187
36184
|
}
|
|
36188
36185
|
break;
|
|
36189
36186
|
case PdfDockStyle.Right:
|
|
@@ -36193,7 +36190,7 @@ var PdfPageTemplateElement = /** @__PURE__ @class */ (function () {
|
|
|
36193
36190
|
height = actualBounds.height;
|
|
36194
36191
|
break;
|
|
36195
36192
|
case PdfDockStyle.Bottom:
|
|
36196
|
-
x =
|
|
36193
|
+
x = this.convertSign(actualBounds.x);
|
|
36197
36194
|
y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;
|
|
36198
36195
|
width = actualSize.width;
|
|
36199
36196
|
height = this.height;
|
|
@@ -36211,6 +36208,13 @@ var PdfPageTemplateElement = /** @__PURE__ @class */ (function () {
|
|
|
36211
36208
|
result = new RectangleF(x, y, width, height);
|
|
36212
36209
|
return result;
|
|
36213
36210
|
};
|
|
36211
|
+
/**
|
|
36212
|
+
* Ignore value zero, otherwise convert sign.
|
|
36213
|
+
* @private
|
|
36214
|
+
*/
|
|
36215
|
+
PdfPageTemplateElement.prototype.convertSign = function (value) {
|
|
36216
|
+
return (value !== 0 || (value === 0 && 1 / value === -Infinity)) ? -value : value;
|
|
36217
|
+
};
|
|
36214
36218
|
return PdfPageTemplateElement;
|
|
36215
36219
|
}());
|
|
36216
36220
|
|