I am facing issue with HTML2CANVAS, when i click on button the following function get called its take 10 to 15 seconds for the window to open with canvas image in it if element is too large then it take much more time, is there any way to handle this
` const exportAsPicture = async () => {
try {
present();
var data = document.getElementById('print-area')
const canvas = await htmlToImage.toCanvas(data)
var win = window.open();
var style = win.document.createElement('style');
style.innerHTML = `
body {
margin: 0;
padding: 0;
}
`;
win.document.head.appendChild(style);
win.document.body.appendChild(canvas);
win.print();
win.close();
dismiss();
} catch (error) {
console.log(error);
dismiss();
}
}`
Dear Team,
I am facing issue with HTML2CANVAS, when i click on button the following function get called its take 10 to 15 seconds for the window to open with canvas image in it if element is too large then it take much more time, is there any way to handle this
` const exportAsPicture = async () => {