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 Train Your Dragon”. Note the missing space between the words “How” and “to”.
https://github.com/parallax/jsPDF/issues/3742