I'm using the following to download my fabricjs canvas and it works great but I wondered how I might be able to make the downloaded image larger so that it's clearer when I print it? Thanks for any help in advance.
// Download as png
function download(url, name) {
// make the link. set the href and download. emulate dom click
$('<a>').attr({
href: url,
download: name
})[0].click();
}
function downloadFabric(canvas, name) {
// convert the canvas to a data url and download it.
download(canvas.toDataURL(), name + '.png');
}
<button onclick="downloadFabric(canvas,'save');">Save</button>