I have a problem. I am making something like a coloring book and I make it working on SVG images. When user have already painted this image I need to provide him download this with posibility of print. So user has to download it as a PDF file. I have already made downloading as a SVG file, but I have problem with converting it to the PDF file. Can you help me?
download = () => {
var svgData = $("#esfalgie")[0].outerHTML;
var svgBlob = new Blob([svgData], {type:"image/svg+xml;charset=utf-8"});
var svgUrl = URL.createObjectURL(svgBlob);
console.log(svgData);
var downloadLink = document.createElement("a");
downloadLink.href = svgUrl;
downloadLink.download = "newesttree.svg";
document.body.appendChild(downloadLink);
downloadLink.click();
document.body.removeChild(downloadLink);
}