@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
|
@@ -17688,8 +17688,8 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
|
|
|
17688
17688
|
var symbols = StringTokenizer.spaces;
|
|
17689
17689
|
var whitespacesCount = StringTokenizer.getCharsCount(line, symbols);
|
|
17690
17690
|
var hasSpaces = (whitespacesCount > 0 && line[0] !== StringTokenizer.whiteSpace);
|
|
17691
|
-
var goodLineBreakStyle = ((lineInfo.lineType & LineType.LayoutBreak) > 0);
|
|
17692
|
-
var shouldJustify = (justifyStyle && goodWidth && hasSpaces &&
|
|
17691
|
+
var goodLineBreakStyle = ((lineInfo.lineType & LineType.LayoutBreak) > 0) || (format && format.wordWrap === PdfWordWrapType.None);
|
|
17692
|
+
var shouldJustify = (justifyStyle && goodWidth && hasSpaces && goodLineBreakStyle);
|
|
17693
17693
|
return shouldJustify;
|
|
17694
17694
|
};
|
|
17695
17695
|
/**
|
|
@@ -23473,6 +23473,12 @@ var TextLayouter = /** @__PURE__ @class */ (function (_super) {
|
|
|
23473
23473
|
var brush = this.element.getBrush();
|
|
23474
23474
|
if (this.element instanceof PdfTextWebLink) {
|
|
23475
23475
|
brush.color = new PdfColor(0, 0, 255);
|
|
23476
|
+
if (!this.element._isLastElement && this.element.stringFormat && this.element.stringFormat.alignment === PdfTextAlignment.Justify) {
|
|
23477
|
+
stringResult.layoutLines[0].type = LineType.LayoutBreak | LineType.FirstParagraphLine;
|
|
23478
|
+
}
|
|
23479
|
+
}
|
|
23480
|
+
if (this.element && this.element instanceof PdfTextElement && !this.element._isLastElement && this.element.stringFormat && this.element.stringFormat.alignment === PdfTextAlignment.Justify) {
|
|
23481
|
+
stringResult.layoutLines[0].type = LineType.LayoutBreak | LineType.FirstParagraphLine;
|
|
23476
23482
|
}
|
|
23477
23483
|
graphics.drawStringLayoutResult(stringResult, this.element.font, this.element.pen, brush, currentBounds, this.format);
|
|
23478
23484
|
var lineInfo = stringResult.lines[stringResult.lineCount - 1];
|
|
@@ -23597,6 +23603,7 @@ var PdfTextElement = /** @__PURE__ @class */ (function (_super) {
|
|
|
23597
23603
|
* @private
|
|
23598
23604
|
*/
|
|
23599
23605
|
_this.hasPointOverload = false;
|
|
23606
|
+
_this._isLastElement = false;
|
|
23600
23607
|
/**
|
|
23601
23608
|
* indicate whether the PdfGridCell value is `PdfTextElement`
|
|
23602
23609
|
* @default false
|
|
@@ -23856,6 +23863,9 @@ var PdfTextElement = /** @__PURE__ @class */ (function (_super) {
|
|
|
23856
23863
|
}
|
|
23857
23864
|
param.bounds = bounds;
|
|
23858
23865
|
}
|
|
23866
|
+
if (i === stringLayoutResult.lines.length - 1) {
|
|
23867
|
+
this._isLastElement = true;
|
|
23868
|
+
}
|
|
23859
23869
|
layoutResult = this.layout(param);
|
|
23860
23870
|
if (i !== (stringLayoutResult.lines.length - 1)) {
|
|
23861
23871
|
bounds = new RectangleF(0, layoutResult.bounds.y + stringLayoutResult.lineHeight, layoutResult.page.graphics.clientSize.width, stringLayoutResult.lineHeight);
|
|
@@ -24215,6 +24225,9 @@ var PdfTextWebLink = /** @__PURE__ @class */ (function (_super) {
|
|
|
24215
24225
|
var layoutResult;
|
|
24216
24226
|
for (var i = 0; i < result.layoutLines.length; i++) {
|
|
24217
24227
|
var size = this.font.measureString(result.lines[i].text);
|
|
24228
|
+
if (i === result.layoutLines.length - 1 && this.stringFormat && this.stringFormat.alignment === PdfTextAlignment.Justify) {
|
|
24229
|
+
this._isLastElement = true;
|
|
24230
|
+
}
|
|
24218
24231
|
var bounds = new RectangleF(location, size);
|
|
24219
24232
|
if (i !== 0) {
|
|
24220
24233
|
bounds.x = 0;
|