javascript - Html2canvas image capturing issue with UTF-8 characters -


i want capture webpage, in order find html2canvas, when use shown below ,my utf-8 (persian) characters in trouble , direction destroyed see.

html:

   <div id="wrapper">         <span>این کاراکتر ها بهم میریزند</span>     </div> 

javascript:

$(document).ready(function() {     html2canvas($("#wrapper"), {         onrendered: function (canvas) {             thecanvas = canvas;              document.body.appendchild(canvas);              canvas.toblob(function (blob) {                 saveas(blob, "dashboard.png");             });         }     });      }); 

webpage:

enter image description here

captured webpage via html2canvas:

enter image description here

you can see full example here

what wrong implementation?

this bug html2canvas (arabic encoding html2canvas) , can fixed setting text-align: left on wrapper element.

here's updated fiddle http://jsfiddle.net/ydel72m8/1/


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -