I'm using jsPDF with my nuxt.js project where I fetch the html from API when the user clicks the Export button then converts the HTML to PDF before download. The HTML file that I got from API looks completely normal but after being converted with jsPDF and exporting out I didn't get the full sentence but rather a word by word in one column instead (like the image below). Could anyone please help me fine out where I did wrong. Bellow are my codes
<span
class="btn"
title="Export report"
v-if="!isExporting"
@click="exportReport"
>Export Report</span
>
import html2canvas from "html2canvas";
import jsPDF from "jspdf";
downloadReport() {
Service.getHTMLReport().then(response => {
var doc = new jsPDF("p", "pt", "a4");
let htmlFile = response;
doc.html(htmlFile, {
callback: function(pdf) {
pdf.save("report.pdf");
}
});
});
}