문제

I am using rasterizehtml.js plugin to render my html into canvas! I got some issues but managed to fix all of them except the very important one. I am getting problems with toDataUrl(); it shows that it is blocked. I googled a lot. There were some stuff concerning that but i found no solution to my question.

The error is this one: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported

도움이 되었습니까?

해결책

Chrome and Safari both have issues reported for what you seem to be seeing. <foreignObject> elements in SVGs will taint the canvas for both browsers thus making toDataUrl fail. See limitations listed here.

Firefox is working fine.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top