@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 23.1.43
3
+ * version : 23.2.4
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-pdf-export@*",
3
- "_id": "@syncfusion/ej2-pdf-export@23.1.39",
3
+ "_id": "@syncfusion/ej2-pdf-export@23.1.43",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-RtZqzsRNvJsU3SMn5M2uPnqNvZ/VSRlggZ1LoDhV9s9eaef69Kn+Sa80XA0gHiT9tt3DF9w7gfML3fzTnvZshQ==",
5
+ "_integrity": "sha512-R+LAKP3xyWtkYSeiDDKp6zT0iUH2oEB60OQ8TTuYGyocC+tjSIEo7pZimKjtdnzSVdDwQTN3Uj5i4u3stMJrkA==",
6
6
  "_location": "/@syncfusion/ej2-pdf-export",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,12 +24,11 @@
24
24
  "/@syncfusion/ej2-grids",
25
25
  "/@syncfusion/ej2-lineargauge",
26
26
  "/@syncfusion/ej2-maps",
27
- "/@syncfusion/ej2-pdfviewer",
28
27
  "/@syncfusion/ej2-pivotview",
29
28
  "/@syncfusion/ej2-treemap"
30
29
  ],
31
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-pdf-export/-/ej2-pdf-export-23.1.39.tgz",
32
- "_shasum": "7d8a50c3197f14d9783c5abef7b8a6f7ff55e03d",
30
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-pdf-export/-/ej2-pdf-export-23.1.43.tgz",
31
+ "_shasum": "b98960fa012f139516f4164b49bace3fa33c2658",
33
32
  "_spec": "@syncfusion/ej2-pdf-export@*",
34
33
  "_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
35
34
  "author": {
@@ -37,7 +36,7 @@
37
36
  },
38
37
  "bundleDependencies": false,
39
38
  "dependencies": {
40
- "@syncfusion/ej2-compression": "~23.1.36"
39
+ "@syncfusion/ej2-compression": "~23.2.4"
41
40
  },
42
41
  "deprecated": false,
43
42
  "description": "Syncfusion TypeScript Component",
@@ -48,7 +47,7 @@
48
47
  "module": "./index.js",
49
48
  "name": "@syncfusion/ej2-pdf-export",
50
49
  "typings": "index.d.ts",
51
- "version": "23.1.43",
50
+ "version": "23.2.4",
52
51
  "sideEffects": false,
53
52
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
54
53
  }
@@ -232,4 +232,9 @@ export declare class PdfPageTemplateElement {
232
232
  * @private
233
233
  */
234
234
  private getTemplateDockBounds;
235
+ /**
236
+ * Ignore value zero, otherwise convert sign.
237
+ * @private
238
+ */
239
+ private convertSign;
235
240
  }
@@ -359,9 +359,6 @@ var PdfPageTemplateElement = /** @class */ (function () {
359
359
  PdfPageTemplateElement.prototype.draw = function (layer, document) {
360
360
  var page = layer.page;
361
361
  var bounds = this.calculateBounds(page, document);
362
- if (bounds.x === -0) {
363
- bounds.x = 0;
364
- }
365
362
  layer.graphics.drawPdfTemplate(this.template, new PointF(bounds.x, bounds.y), new SizeF(bounds.width, bounds.height));
366
363
  };
367
364
  /**
@@ -457,17 +454,17 @@ var PdfPageTemplateElement = /** @class */ (function () {
457
454
  switch (this.alignmentStyle) {
458
455
  case PdfAlignmentStyle.TopLeft:
459
456
  if (this.type === TemplateType.Left) {
460
- x = -actualBounds.x;
457
+ x = this.convertSign(actualBounds.x);
461
458
  y = 0;
462
459
  }
463
460
  else if (this.type === TemplateType.Top) {
464
- x = -actualBounds.x;
465
- y = -actualBounds.y;
461
+ x = this.convertSign(actualBounds.x);
462
+ y = this.convertSign(actualBounds.y);
466
463
  }
467
464
  break;
468
465
  case PdfAlignmentStyle.TopCenter:
469
466
  x = (actualBounds.width - this.width) / 2;
470
- y = -actualBounds.y;
467
+ y = this.convertSign(actualBounds.y);
471
468
  break;
472
469
  case PdfAlignmentStyle.TopRight:
473
470
  if (this.type === TemplateType.Right) {
@@ -476,11 +473,11 @@ var PdfPageTemplateElement = /** @class */ (function () {
476
473
  }
477
474
  else if (this.type === TemplateType.Top) {
478
475
  x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;
479
- y = -actualBounds.y;
476
+ y = this.convertSign(actualBounds.y);
480
477
  }
481
478
  break;
482
479
  case PdfAlignmentStyle.MiddleLeft:
483
- x = -actualBounds.x;
480
+ x = this.convertSign(actualBounds.x);
484
481
  y = (actualBounds.height - this.height) / 2;
485
482
  break;
486
483
  case PdfAlignmentStyle.MiddleCenter:
@@ -493,11 +490,11 @@ var PdfPageTemplateElement = /** @class */ (function () {
493
490
  break;
494
491
  case PdfAlignmentStyle.BottomLeft:
495
492
  if (this.type === TemplateType.Left) {
496
- x = -actualBounds.x;
493
+ x = this.convertSign(actualBounds.x);
497
494
  y = actualBounds.height - this.height;
498
495
  }
499
496
  else if (this.type === TemplateType.Bottom) {
500
- x = -actualBounds.x;
497
+ x = this.convertSign(actualBounds.x);
501
498
  y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;
502
499
  }
503
500
  break;
@@ -596,18 +593,18 @@ var PdfPageTemplateElement = /** @class */ (function () {
596
593
  var height = this.height;
597
594
  switch (this.dockStyle) {
598
595
  case PdfDockStyle.Left:
599
- x = -actualBounds.x;
596
+ x = this.convertSign(actualBounds.x);
600
597
  y = 0;
601
598
  width = this.width;
602
599
  height = actualBounds.height;
603
600
  break;
604
601
  case PdfDockStyle.Top:
605
- x = -actualBounds.x;
606
- y = -actualBounds.y;
602
+ x = this.convertSign(actualBounds.x);
603
+ y = this.convertSign(actualBounds.y);
607
604
  width = actualSize.width;
608
605
  height = this.height;
609
606
  if (actualBounds.height < 0) {
610
- y = -actualBounds.y + actualSize.height;
607
+ y = actualSize.height - actualBounds.y;
611
608
  }
612
609
  break;
613
610
  case PdfDockStyle.Right:
@@ -617,7 +614,7 @@ var PdfPageTemplateElement = /** @class */ (function () {
617
614
  height = actualBounds.height;
618
615
  break;
619
616
  case PdfDockStyle.Bottom:
620
- x = -actualBounds.x;
617
+ x = this.convertSign(actualBounds.x);
621
618
  y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;
622
619
  width = actualSize.width;
623
620
  height = this.height;
@@ -635,6 +632,13 @@ var PdfPageTemplateElement = /** @class */ (function () {
635
632
  result = new RectangleF(x, y, width, height);
636
633
  return result;
637
634
  };
635
+ /**
636
+ * Ignore value zero, otherwise convert sign.
637
+ * @private
638
+ */
639
+ PdfPageTemplateElement.prototype.convertSign = function (value) {
640
+ return (value !== 0 || (value === 0 && 1 / value === -Infinity)) ? -value : value;
641
+ };
638
642
  return PdfPageTemplateElement;
639
643
  }());
640
644
  export { PdfPageTemplateElement };