I have a fees module.. In that, when I click the download button the fee table automatically converted as a PDF file by using j query. But the output was shown as a table.. I want it as a paragraph view.. How to do that..?
Here is the J query that I've used to converted as a table view in PDF.
<script>
<![CDATA[
function generate() {
var doc = new jsPDF();
doc.setFontSize(18);
doc.setFontSize(18);
doc.addImage(imgData, 'JPEG', 120,0, 40, 20);
var res = doc.autoTableHtmlToJson(document.getElementById("example2"));
for (var j = 0; j < 12; j++) {
doc.autoTable(res.columns, res.data ,{
tableWidth: '600',
headerStyles: {rowHeight: 7, fontSize: 9,valign: 'middle' },
bodyStyles: {rowHeight: 7, fontSize: 8, valign: 'middle'},
startY:30,
theme: 'grid',overflow: 'linebreak'
});
}
doc.save("fee-report_#{collect.regno}.pdf");
};
</script>