0👍
on the client, you can use jsPDF…
var canvas = document.getElementById('canvas_barchart');
var doc = new jsPDF();
doc.addImage(ctx.toDataURL('image/png'), 0, 0);
doc.save('chart.pdf');
or you can use ajax to send the image back to the server and save it there…
$.ajax({
data: {
image: ctx.toDataURL('image/png')
},
type: 'POST',
url: 'server/saveImage'
});
Source:stackexchange.com