I am creating a pdf from the html document with the help of the jspdf plugin. It is generating the pdf but the font looks blurred and pixelated. Can you please suggest me how to increase the quality of the pdf and the font in the pdf? Here is my jspdf code below:
function GeneratePDF() {
var pdf = new jsPDF("p", "pt", "a4");
var pdfName = 'Reports.pdf';
var options = {};
document.getElementById('page-loader').style.display='block';
var $divs = $('.target');
var numRecursionsNeeded = $divs.length - 1;
var currentRecursion = 0;
function recursiveAddHtmlAndSave(currentRecursion, totalRecursions) {
if (currentRecursion == totalRecursions) {
document.getElementById('page-loader').style.display='none';
pdf.save(pdfName);
} else {
currentRecursion++;
pdf.addPage();
pdf.addHTML($('.target')[currentRecursion], 6, 7, options, function () {
// console.log(currentRecursion);
recursiveAddHtmlAndSave(currentRecursion, totalRecursions)
});
}
}
pdf.addHTML($('.target')[currentRecursion], 6, 7, options, function () {
recursiveAddHtmlAndSave(currentRecursion, numRecursionsNeeded);
});
}