jsPDF.html truncates some whitespace characters from each element
geoidesic opened this issue · 1 comments
geoidesic commented
jsPDF v 2.5.1
const pdf = new jsPDF('p', 'pt', 'a4');
pdf.html('<h1>How to Train Your Dragon</h1>', {
callback: function (doc) {
pdf.save(`${journal.name}.pdf`);
},
autoPaging: 'text',
jsPDF: pdf,
windowWidth: 600,
width: 600
});
The output in the PDF is "Howto TrainYourDragon". Note the missing spaces between some words.
Similar problems reported by other users: https://stackoverflow.com/questions/69705309/jspdf-html2canvas-losing-spaces-and-misaligning-text-generally