I'm currently encountering an issue with the jsPDF library. Although PDF generation works fine, I am struggling to justify text properly. The align: 'justify'
attribute seems to function the same as align: 'left'
, and setting a specific number for maxWidth
does not align the text correctly. Here's an example code snippet:
doc.text(
"Lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet",
10,
203,
{ align: "justify", lineHeightFactor: 1.5, maxWidth: 190 }
);
The text output is not justified and simply breaks at the specified maxWidth
. Any guidance on how to properly justify the text in the rendered PDF would be greatly appreciated.