@syncfusion/ej2-pdf-export 28.1.33 → 28.2.3

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 : 28.1.33
3
+ * version : 28.2.3
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. 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@0.38.8",
3
+ "_id": "@syncfusion/ej2-pdf-export@28.1.33",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Wxc5yKz19Za4UYAj3RoqbpM2B2ROUgbQyVub79u4wHXtGHbzXYihmSegVMpeOyXnNLmMqsIVYBr6f3itGCVZbw==",
5
+ "_integrity": "sha512-TqdkEImirvDsL/SWEVGf68sKsvD/cMYg7un0m9nrDd4YTA6RvTiK0tuTtIMhOnx5BHjn7gHfO0/vw6vbcPodvw==",
6
6
  "_location": "/@syncfusion/ej2-pdf-export",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -27,8 +27,8 @@
27
27
  "/@syncfusion/ej2-pivotview",
28
28
  "/@syncfusion/ej2-treemap"
29
29
  ],
30
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-pdf-export/-/ej2-pdf-export-0.38.8.tgz",
31
- "_shasum": "f428b8d900c48c98c0db53e1afd30d08ca056598",
30
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-pdf-export/-/ej2-pdf-export-28.1.33.tgz",
31
+ "_shasum": "5ecbbd02fa954ec4a6396700108b93fd524dd9cb",
32
32
  "_spec": "@syncfusion/ej2-pdf-export@*",
33
33
  "_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
34
34
  "author": {
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-compression": "~28.1.33"
39
+ "@syncfusion/ej2-compression": "~28.2.3"
40
40
  },
41
41
  "deprecated": false,
42
42
  "description": "Syncfusion TypeScript Component",
@@ -47,7 +47,7 @@
47
47
  "module": "./index.js",
48
48
  "name": "@syncfusion/ej2-pdf-export",
49
49
  "typings": "index.d.ts",
50
- "version": "28.1.33",
50
+ "version": "28.2.3",
51
51
  "sideEffects": false,
52
52
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
53
53
  }
@@ -185,6 +185,9 @@ var PdfTextWebLink = /** @class */ (function (_super) {
185
185
  var layoutResult;
186
186
  for (var i = 0; i < result.layoutLines.length; i++) {
187
187
  var size = this.font.measureString(result.lines[i].text);
188
+ if (i === result.layoutLines.length - 1 && this.stringFormat && this.stringFormat.alignment === PdfTextAlignment.Justify) {
189
+ this._isLastElement = true;
190
+ }
188
191
  var bounds = new RectangleF(location, size);
189
192
  if (i !== 0) {
190
193
  bounds.x = 0;
@@ -15,11 +15,13 @@ var __extends = (this && this.__extends) || (function () {
15
15
  * TextLayouter.ts class for EJ2-PDF
16
16
  */
17
17
  import { ElementLayouter, PdfLayoutResult } from './element-layouter';
18
+ import { PdfTextElement } from './../text-element';
18
19
  import { RectangleF, SizeF } from './../../../drawing/pdf-drawing';
19
- import { PdfStringLayouter } from './../../fonts/string-layouter';
20
+ import { LineType, PdfStringLayouter } from './../../fonts/string-layouter';
20
21
  import { PdfLayoutBreakType } from './../../figures/enum';
21
22
  import { PdfColor } from './../../pdf-color';
22
23
  import { PdfTextWebLink } from './../../../annotations/pdf-text-web-link';
24
+ import { PdfTextAlignment } from '../../enum';
23
25
  /**
24
26
  * Class that `layouts the text`.
25
27
  * @private
@@ -96,6 +98,12 @@ var TextLayouter = /** @class */ (function (_super) {
96
98
  var brush = this.element.getBrush();
97
99
  if (this.element instanceof PdfTextWebLink) {
98
100
  brush.color = new PdfColor(0, 0, 255);
101
+ if (!this.element._isLastElement && this.element.stringFormat && this.element.stringFormat.alignment === PdfTextAlignment.Justify) {
102
+ stringResult.layoutLines[0].type = LineType.LayoutBreak | LineType.FirstParagraphLine;
103
+ }
104
+ }
105
+ if (this.element && this.element instanceof PdfTextElement && !this.element._isLastElement && this.element.stringFormat && this.element.stringFormat.alignment === PdfTextAlignment.Justify) {
106
+ stringResult.layoutLines[0].type = LineType.LayoutBreak | LineType.FirstParagraphLine;
99
107
  }
100
108
  graphics.drawStringLayoutResult(stringResult, this.element.font, this.element.pen, brush, currentBounds, this.format);
101
109
  var lineInfo = stringResult.lines[stringResult.lineCount - 1];
@@ -52,6 +52,7 @@ export declare class PdfTextElement extends PdfLayoutElement {
52
52
  * @private
53
53
  */
54
54
  private hasPointOverload;
55
+ _isLastElement: boolean;
55
56
  /**
56
57
  * indicate whether the PdfGridCell value is `PdfTextElement`
57
58
  * @default false
@@ -53,6 +53,7 @@ var PdfTextElement = /** @class */ (function (_super) {
53
53
  * @private
54
54
  */
55
55
  _this.hasPointOverload = false;
56
+ _this._isLastElement = false;
56
57
  /**
57
58
  * indicate whether the PdfGridCell value is `PdfTextElement`
58
59
  * @default false
@@ -317,6 +318,9 @@ var PdfTextElement = /** @class */ (function (_super) {
317
318
  }
318
319
  param.bounds = bounds;
319
320
  }
321
+ if (i === stringLayoutResult.lines.length - 1) {
322
+ this._isLastElement = true;
323
+ }
320
324
  layoutResult = this.layout(param);
321
325
  if (i !== (stringLayoutResult.lines.length - 1)) {
322
326
  bounds = new RectangleF(0, layoutResult.bounds.y + stringLayoutResult.lineHeight, layoutResult.page.graphics.clientSize.width, stringLayoutResult.lineHeight);
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { PdfColorSpace, TextRenderingMode, PdfFillMode, PdfTextAlignment } from './enum';
5
5
  import { PdfVerticalAlignment, PdfBlendMode } from './enum';
6
- import { PdfSubSuperScript } from './fonts/enum';
6
+ import { PdfSubSuperScript, PdfWordWrapType } from './fonts/enum';
7
7
  import { PdfStreamWriter } from './../input-output/pdf-stream-writer';
8
8
  import { PdfPen } from './pdf-pen';
9
9
  import { PdfBrush } from './brushes/pdf-brush';
@@ -1181,8 +1181,8 @@ var PdfGraphics = /** @class */ (function () {
1181
1181
  var symbols = StringTokenizer.spaces;
1182
1182
  var whitespacesCount = StringTokenizer.getCharsCount(line, symbols);
1183
1183
  var hasSpaces = (whitespacesCount > 0 && line[0] !== StringTokenizer.whiteSpace);
1184
- var goodLineBreakStyle = ((lineInfo.lineType & LineType.LayoutBreak) > 0);
1185
- var shouldJustify = (justifyStyle && goodWidth && hasSpaces && (goodLineBreakStyle || format.alignment === PdfTextAlignment.Justify));
1184
+ var goodLineBreakStyle = ((lineInfo.lineType & LineType.LayoutBreak) > 0) || (format && format.wordWrap === PdfWordWrapType.None);
1185
+ var shouldJustify = (justifyStyle && goodWidth && hasSpaces && goodLineBreakStyle);
1186
1186
  return shouldJustify;
1187
1187
  };
1188
1188
  /**