Open harshitverma-dev opened 4 months ago
async takeScreenshot() { let id = "#LqsAnalyser" + this.asinData html2canvas(document.querySelector(id), { useCORS: true , }).then(function (canvas) { canvas.style.display = "none" document.body.appendChild(canvas); const image = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream"); const a = document.createElement("a"); a.setAttribute("download", "weavr-lqs.png"); a.setAttribute("href", image); a.click(); }); },
<span class="ml-2" @click="takeScreenshot"><i class="fa fa-download cursor-pointer text-primary bg-black px-2 py-1 border rounded" aria-hidden="true" ></i> </span>
html2canvas is not working fine. it's taking only first screenshot properly and remaining screenshots are coming blank. please suggest any solution for this problems.
async takeScreenshot() { let id = "#LqsAnalyser" + this.asinData html2canvas(document.querySelector(id), { useCORS: true , }).then(function (canvas) { canvas.style.display = "none" document.body.appendChild(canvas); const image = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream"); const a = document.createElement("a"); a.setAttribute("download", "weavr-lqs.png"); a.setAttribute("href", image); a.click(); }); },
html2canvas is not working fine. it's taking only first screenshot properly and remaining screenshots are coming blank. please suggest any solution for this problems.