@syncfusion/ej2-pdf-export 23.1.43 → 23.2.6

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.
@@ -18228,7 +18228,12 @@ var PdfGraphicsState = /** @__PURE__ @class */ (function () {
18228
18228
  this.pdfColorSpace = PdfColorSpace.Rgb;
18229
18229
  if (typeof graphics !== 'undefined') {
18230
18230
  this.pdfGraphics = graphics;
18231
- this.transformationMatrix = matrix;
18231
+ var elements_1 = [];
18232
+ graphics.matrix.matrix.elements.forEach(function (element) {
18233
+ elements_1.push(element);
18234
+ });
18235
+ this.transformationMatrix = new PdfTransformationMatrix();
18236
+ this.transformationMatrix.matrix = new Matrix(elements_1);
18232
18237
  }
18233
18238
  }
18234
18239
  Object.defineProperty(PdfGraphicsState.prototype, "graphics", {
@@ -35935,9 +35940,6 @@ var PdfPageTemplateElement = /** @__PURE__ @class */ (function () {
35935
35940
  PdfPageTemplateElement.prototype.draw = function (layer, document) {
35936
35941
  var page = layer.page;
35937
35942
  var bounds = this.calculateBounds(page, document);
35938
- if (bounds.x === -0) {
35939
- bounds.x = 0;
35940
- }
35941
35943
  layer.graphics.drawPdfTemplate(this.template, new PointF(bounds.x, bounds.y), new SizeF(bounds.width, bounds.height));
35942
35944
  };
35943
35945
  /**
@@ -36033,17 +36035,17 @@ var PdfPageTemplateElement = /** @__PURE__ @class */ (function () {
36033
36035
  switch (this.alignmentStyle) {
36034
36036
  case PdfAlignmentStyle.TopLeft:
36035
36037
  if (this.type === TemplateType.Left) {
36036
- x = -actualBounds.x;
36038
+ x = this.convertSign(actualBounds.x);
36037
36039
  y = 0;
36038
36040
  }
36039
36041
  else if (this.type === TemplateType.Top) {
36040
- x = -actualBounds.x;
36041
- y = -actualBounds.y;
36042
+ x = this.convertSign(actualBounds.x);
36043
+ y = this.convertSign(actualBounds.y);
36042
36044
  }
36043
36045
  break;
36044
36046
  case PdfAlignmentStyle.TopCenter:
36045
36047
  x = (actualBounds.width - this.width) / 2;
36046
- y = -actualBounds.y;
36048
+ y = this.convertSign(actualBounds.y);
36047
36049
  break;
36048
36050
  case PdfAlignmentStyle.TopRight:
36049
36051
  if (this.type === TemplateType.Right) {
@@ -36052,11 +36054,11 @@ var PdfPageTemplateElement = /** @__PURE__ @class */ (function () {
36052
36054
  }
36053
36055
  else if (this.type === TemplateType.Top) {
36054
36056
  x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;
36055
- y = -actualBounds.y;
36057
+ y = this.convertSign(actualBounds.y);
36056
36058
  }
36057
36059
  break;
36058
36060
  case PdfAlignmentStyle.MiddleLeft:
36059
- x = -actualBounds.x;
36061
+ x = this.convertSign(actualBounds.x);
36060
36062
  y = (actualBounds.height - this.height) / 2;
36061
36063
  break;
36062
36064
  case PdfAlignmentStyle.MiddleCenter:
@@ -36069,11 +36071,11 @@ var PdfPageTemplateElement = /** @__PURE__ @class */ (function () {
36069
36071
  break;
36070
36072
  case PdfAlignmentStyle.BottomLeft:
36071
36073
  if (this.type === TemplateType.Left) {
36072
- x = -actualBounds.x;
36074
+ x = this.convertSign(actualBounds.x);
36073
36075
  y = actualBounds.height - this.height;
36074
36076
  }
36075
36077
  else if (this.type === TemplateType.Bottom) {
36076
- x = -actualBounds.x;
36078
+ x = this.convertSign(actualBounds.x);
36077
36079
  y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;
36078
36080
  }
36079
36081
  break;
@@ -36172,18 +36174,18 @@ var PdfPageTemplateElement = /** @__PURE__ @class */ (function () {
36172
36174
  var height = this.height;
36173
36175
  switch (this.dockStyle) {
36174
36176
  case PdfDockStyle.Left:
36175
- x = -actualBounds.x;
36177
+ x = this.convertSign(actualBounds.x);
36176
36178
  y = 0;
36177
36179
  width = this.width;
36178
36180
  height = actualBounds.height;
36179
36181
  break;
36180
36182
  case PdfDockStyle.Top:
36181
- x = -actualBounds.x;
36182
- y = -actualBounds.y;
36183
+ x = this.convertSign(actualBounds.x);
36184
+ y = this.convertSign(actualBounds.y);
36183
36185
  width = actualSize.width;
36184
36186
  height = this.height;
36185
36187
  if (actualBounds.height < 0) {
36186
- y = -actualBounds.y + actualSize.height;
36188
+ y = actualSize.height - actualBounds.y;
36187
36189
  }
36188
36190
  break;
36189
36191
  case PdfDockStyle.Right:
@@ -36193,7 +36195,7 @@ var PdfPageTemplateElement = /** @__PURE__ @class */ (function () {
36193
36195
  height = actualBounds.height;
36194
36196
  break;
36195
36197
  case PdfDockStyle.Bottom:
36196
- x = -actualBounds.x;
36198
+ x = this.convertSign(actualBounds.x);
36197
36199
  y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;
36198
36200
  width = actualSize.width;
36199
36201
  height = this.height;
@@ -36211,6 +36213,13 @@ var PdfPageTemplateElement = /** @__PURE__ @class */ (function () {
36211
36213
  result = new RectangleF(x, y, width, height);
36212
36214
  return result;
36213
36215
  };
36216
+ /**
36217
+ * Ignore value zero, otherwise convert sign.
36218
+ * @private
36219
+ */
36220
+ PdfPageTemplateElement.prototype.convertSign = function (value) {
36221
+ return (value !== 0 || (value === 0 && 1 / value === -Infinity)) ? -value : value;
36222
+ };
36214
36223
  return PdfPageTemplateElement;
36215
36224
  }());
36216
36225