@syncfusion/ej2-pdf-export 28.1.33 → 28.1.38
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/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 +15 -2
- package/dist/es6/ej2-pdf-export.es2015.js.map +1 -1
- package/dist/es6/ej2-pdf-export.es5.js +15 -2
- 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 +5 -5
- package/src/implementation/annotations/pdf-text-web-link.js +3 -0
- package/src/implementation/graphics/figures/base/text-layouter.js +9 -1
- package/src/implementation/graphics/figures/text-element.d.ts +1 -0
- package/src/implementation/graphics/figures/text-element.js +4 -0
- package/src/implementation/graphics/pdf-graphics.js +3 -3
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 28.1.
|
|
3
|
+
* version : 28.1.38
|
|
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@
|
|
3
|
+
"_id": "@syncfusion/ej2-pdf-export@28.1.33",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
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-
|
|
31
|
-
"_shasum": "
|
|
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": {
|
|
@@ -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.
|
|
50
|
+
"version": "28.1.38",
|
|
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];
|
|
@@ -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 &&
|
|
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
|
/**
|