I have used jspdf and html2canvas for downloading Multiple svg into pdf format.
It is working fine in Chrome/Edge but not in Internet explorer as it shows Promise is undefined.
$("#dwnlPdf").click(function () {
downloadDocs();
});
var doc = new jsPDF('landscape');
function downloadDocs() {
var length = $(".classDivs").length / 2; // pdf splitting
for (let i = 0; i < length; i++) {
var chart = $('#div' + i)[0];
html2canvas(chart).then(function (canvas) {
doc.addImage(canvas.toDataURL('image/png'), 'JPEG', 10, 10, 180, 150);
if (i < (length - 1)) {
doc.addPage();
}
else if(i==length-1)
{
doc.save('pdfdocs.pdf');
}
});
}
}
The above is my main JavaScript code, if not this please suggest me other plugins paid versions as well, only thing is it must be client side.
Thanks in Advance.