我正在使用以下内容下载我的fabricjs画布并且它工作得很好,但我想知道如何使下载的图像更大,以便在打印时更清晰?感谢您提前提供任何帮助。
// 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>