marcbachmann / node-html-pdf

This repo isn't maintained anymore as phantomjs got dreprecated a long time ago. Please migrate to headless chrome/puppeteer.
MIT License
3.56k stars 545 forks source link

Why transparent part shows white in html2canvas? #550

Open ghost opened 4 years ago

ghost commented 4 years ago

Hi. Currently,I am using html2canvas to convert image. My image has transparent part. It's converted to one image but still shows transparent part as white. Please let me know how I can solve this issue? Here is my code.

var element = $("#convert_image"); html2canvas(element, { onrendered:function(canvas){ $("#firsrt_show").attr('src',canvas.toDataURL()); $("#convert_image").css("display","none"); } });

Thanks