Export Multiple Charts And Tables Into 1 PDF
I'm looking for 2 JS libraries for generating charts and PDFs. I've already tested some, but none of them has satisfied my needs so far. Background: I need to create several indepe
Solution 1:
Edit: sorry they are using SVG not canvas. So maybe you can find a way how to convert svg to an image.
I think the problem is that jspdf cannot handle html-canvas proberly. You could try to convert the canvas to an image with html2canvas and feed it to jspdf.
Have a look here: Html5-canvas to pdf
Copied from the answer:
html2canvas($("#canvas"), {
onrendered: function(canvas) {
var imgData = canvas.toDataURL(
'image/png');
var doc = new jsPDF('p', 'mm');
doc.addImage(imgData, 'PNG', 10, 10);
doc.save('sample-file.pdf');
}
});
Post a Comment for "Export Multiple Charts And Tables Into 1 PDF"