I am trying to export an html element (a div containing mostly an svg). There are no extra styles being applied (classes, etc) to the element.
The html element looks like this
Here are the different code snippets I have tried which all produce the same result
const canvas = await html2canvas(el, { useCORS: true, copyStyles: true });
const image = canvas.toDataURL("image/png");
...
saveSvgAsPng.svgAsPngUri(
`filename.png`,{ scale: 1, encoderOptions: 1, excludeCss: true }).then(url => {
...
})
toPng(element).then((url) => {
...
}
Any advice or suggestions are greatly appreciated!