Skip to content

Commit 99d4b95

Browse files
authored
Fix word spacing after justified text (#3168)
1 parent f41a18f commit 99d4b95

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/jspdf.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3862,6 +3862,8 @@ function jsPDF(options) {
38623862
)
38633863
)
38643864
);
3865+
} else {
3866+
wordSpacingPerLine.push(0);
38653867
}
38663868
text.push([da[l], newX, newY]);
38673869
}
5 Bytes
Binary file not shown.

test/specs/jspdf.unit.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2433,6 +2433,7 @@ break`,
24332433
"12.84 Tw",
24342434
"28.35 813.54 Td",
24352435
"(This is a) Tj",
2436+
"0 Tw",
24362437
"0. -18.4 Td",
24372438
"(test.) Tj",
24382439
"ET"

0 commit comments

Comments
 (0)