Home › Forums › Chart Support › Export Multiple chart in one pdf › Reply To: Export Multiple chart in one pdf
We don’t have exporting chart as pdf as an inbuilt feature as of now. However with couple of lines of code you can export chart as pdf using jsPDF. Please find the code-snippet below.
var pdf = new jsPDF();
pdf.addImage(dataURL, 'JPEG', 0, 0);
Please take a look at this JSFiddle for complete code.
To export multiple charts present in a page, you can merge all charts into single using html2canvas. And then you can export the merged images to pdf using jspdf. Please take a look at this JSFiddle for an example on the same.
Exporting more than 5 charts also seems to be working fine, when you configure html2canvas options accordingly. Please take a look at this updated JSFiddle. Please refer html2canvas documentation for more configuration options available and configure it in your webpage / app accordingly.