@syncfusion/ej2-pdf-export 23.1.39 → 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 +16 -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
- package/src/index.d.ts +0 -1
- package/src/index.js +0 -1
|
@@ -32320,9 +32320,6 @@ class PdfPageTemplateElement {
|
|
|
32320
32320
|
draw(layer, document) {
|
|
32321
32321
|
let page = layer.page;
|
|
32322
32322
|
let bounds = this.calculateBounds(page, document);
|
|
32323
|
-
if (bounds.x === -0) {
|
|
32324
|
-
bounds.x = 0;
|
|
32325
|
-
}
|
|
32326
32323
|
layer.graphics.drawPdfTemplate(this.template, new PointF(bounds.x, bounds.y), new SizeF(bounds.width, bounds.height));
|
|
32327
32324
|
}
|
|
32328
32325
|
/**
|
|
@@ -32418,17 +32415,17 @@ class PdfPageTemplateElement {
|
|
|
32418
32415
|
switch (this.alignmentStyle) {
|
|
32419
32416
|
case PdfAlignmentStyle.TopLeft:
|
|
32420
32417
|
if (this.type === TemplateType.Left) {
|
|
32421
|
-
x =
|
|
32418
|
+
x = this.convertSign(actualBounds.x);
|
|
32422
32419
|
y = 0;
|
|
32423
32420
|
}
|
|
32424
32421
|
else if (this.type === TemplateType.Top) {
|
|
32425
|
-
x =
|
|
32426
|
-
y =
|
|
32422
|
+
x = this.convertSign(actualBounds.x);
|
|
32423
|
+
y = this.convertSign(actualBounds.y);
|
|
32427
32424
|
}
|
|
32428
32425
|
break;
|
|
32429
32426
|
case PdfAlignmentStyle.TopCenter:
|
|
32430
32427
|
x = (actualBounds.width - this.width) / 2;
|
|
32431
|
-
y =
|
|
32428
|
+
y = this.convertSign(actualBounds.y);
|
|
32432
32429
|
break;
|
|
32433
32430
|
case PdfAlignmentStyle.TopRight:
|
|
32434
32431
|
if (this.type === TemplateType.Right) {
|
|
@@ -32437,11 +32434,11 @@ class PdfPageTemplateElement {
|
|
|
32437
32434
|
}
|
|
32438
32435
|
else if (this.type === TemplateType.Top) {
|
|
32439
32436
|
x = actualBounds.width + section.getRightIndentWidth(document, page, false) - this.width;
|
|
32440
|
-
y =
|
|
32437
|
+
y = this.convertSign(actualBounds.y);
|
|
32441
32438
|
}
|
|
32442
32439
|
break;
|
|
32443
32440
|
case PdfAlignmentStyle.MiddleLeft:
|
|
32444
|
-
x =
|
|
32441
|
+
x = this.convertSign(actualBounds.x);
|
|
32445
32442
|
y = (actualBounds.height - this.height) / 2;
|
|
32446
32443
|
break;
|
|
32447
32444
|
case PdfAlignmentStyle.MiddleCenter:
|
|
@@ -32454,11 +32451,11 @@ class PdfPageTemplateElement {
|
|
|
32454
32451
|
break;
|
|
32455
32452
|
case PdfAlignmentStyle.BottomLeft:
|
|
32456
32453
|
if (this.type === TemplateType.Left) {
|
|
32457
|
-
x =
|
|
32454
|
+
x = this.convertSign(actualBounds.x);
|
|
32458
32455
|
y = actualBounds.height - this.height;
|
|
32459
32456
|
}
|
|
32460
32457
|
else if (this.type === TemplateType.Bottom) {
|
|
32461
|
-
x =
|
|
32458
|
+
x = this.convertSign(actualBounds.x);
|
|
32462
32459
|
y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;
|
|
32463
32460
|
}
|
|
32464
32461
|
break;
|
|
@@ -32557,18 +32554,18 @@ class PdfPageTemplateElement {
|
|
|
32557
32554
|
let height = this.height;
|
|
32558
32555
|
switch (this.dockStyle) {
|
|
32559
32556
|
case PdfDockStyle.Left:
|
|
32560
|
-
x =
|
|
32557
|
+
x = this.convertSign(actualBounds.x);
|
|
32561
32558
|
y = 0;
|
|
32562
32559
|
width = this.width;
|
|
32563
32560
|
height = actualBounds.height;
|
|
32564
32561
|
break;
|
|
32565
32562
|
case PdfDockStyle.Top:
|
|
32566
|
-
x =
|
|
32567
|
-
y =
|
|
32563
|
+
x = this.convertSign(actualBounds.x);
|
|
32564
|
+
y = this.convertSign(actualBounds.y);
|
|
32568
32565
|
width = actualSize.width;
|
|
32569
32566
|
height = this.height;
|
|
32570
32567
|
if (actualBounds.height < 0) {
|
|
32571
|
-
y = -actualBounds.y
|
|
32568
|
+
y = actualSize.height - actualBounds.y;
|
|
32572
32569
|
}
|
|
32573
32570
|
break;
|
|
32574
32571
|
case PdfDockStyle.Right:
|
|
@@ -32578,7 +32575,7 @@ class PdfPageTemplateElement {
|
|
|
32578
32575
|
height = actualBounds.height;
|
|
32579
32576
|
break;
|
|
32580
32577
|
case PdfDockStyle.Bottom:
|
|
32581
|
-
x =
|
|
32578
|
+
x = this.convertSign(actualBounds.x);
|
|
32582
32579
|
y = actualBounds.height + section.getBottomIndentHeight(document, page, false) - this.height;
|
|
32583
32580
|
width = actualSize.width;
|
|
32584
32581
|
height = this.height;
|
|
@@ -32596,6 +32593,13 @@ class PdfPageTemplateElement {
|
|
|
32596
32593
|
result = new RectangleF(x, y, width, height);
|
|
32597
32594
|
return result;
|
|
32598
32595
|
}
|
|
32596
|
+
/**
|
|
32597
|
+
* Ignore value zero, otherwise convert sign.
|
|
32598
|
+
* @private
|
|
32599
|
+
*/
|
|
32600
|
+
convertSign(value) {
|
|
32601
|
+
return (value !== 0 || (value === 0 && 1 / value === -Infinity)) ? -value : value;
|
|
32602
|
+
}
|
|
32599
32603
|
}
|
|
32600
32604
|
|
|
32601
32605
|
/**
|