javascript - div to image to download -


i have problem puting div in image. thing want make div downloadable (right click, download image or on button). div want "downloadable"

<div style="display: block; background-color: transparent; background-repeat: no-repeat; background-image: url(&quot;images/fujairah-plates.png&quot;); background-size: contain; min-height: 90px;" class="" id="plate">                 <div id="plate2"></div>                        <div class="letter-left draw_code" id="draw_code">&nbsp;b</div>           <div class="letter-right draw_num" id="draw_num">&nbsp;</div></div> 

i hope constructive suggestions.

you can use html2canvas js library convert html canvas , after that, can export canvas data uri using todatauri() javascript function. data uri string can presented downloadable image. p. s: i've tried , works perfectly. ☺


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -