0

I'm using html2canvas to convert the div into an image. To save the image I have to go right-click and save it. Is it possible to download the image without right-clicking?

I tried like :

<a href="<canvas style='width: 1903px; height: 886px;' width='1903' height='886'></canvas>">DOWNLOAD</a>

but it doesnt work.

<div id="output">
   <canvas style="width: 1903px; height: 886px;" width="1903" height="886"></canvas>
</div>

Any help is appreciated

Joe
  • 219
  • 2
  • 11
  • as you so rightly "tagged" the question with `javascript` - you will need javsacript to do so - a little research (about 3 seconds worth), I found https://stackoverflow.com/questions/8126623/downloading-canvas-element-to-an-image – Bravo Mar 19 '22 at 23:13

1 Answers1

1

Maybe this answer helps you: https://stackoverflow.com/a/58652379/9855409 or https://stackoverflow.com/a/29756191/9855409

I think you need just to select the canvas and save it as an image, you can't download it because it is not an image yet.

Perry45
  • 66
  • 7