Open urenpatelce opened 3 months ago
Interesting. Even a simple repro like this causes issues with line breaks. Must be something with the width calculation of spaces or similar.
const { jsPDF } = window.jspdf
function generate() {
const doc = new jsPDF();
doc.autoTable({
body: [[` text here`]],
});
doc.save('table');
}
Hi There,
I found one issue where we need text wrapping and formatting fully supported in output PDF. While verifying that, I found that when there are many spaces at the start of the string then text is overflowing the cell boundry instead of dropping to the next line.
https://codepen.io/mmghv/pen/YzzNMLO
Use below Javascript code in the console to replicate the issue.
Verify the final output.
If the text is right align then issue becomes worst. I mean for right align automatically the text should be dropped in the next line too.
Please let me know if you need more details.
Thanks for your time.