html2cavans

简介:http://www.jianshu.com/p/6a07e974a7e8

下载:https://github.com/niklasvh/html2canvas/releases

C#代理gitHub:https://github.com/brcontainer/html2canvas-csharp-proxy

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>html2canvas ashx (c#) proxy</title>
<script src="html2canvas.js"></script>
<script>
//<![CDATA[
(function() {
window.onload = function() {
html2canvas(document.body, {
"logging": true, //Enable log (use Web Console for get Errors and Warings)
"proxy":"html2canvasproxy.ashx",
"onrendered": function(canvas) {
var img = new Image();
img.onload = function() {
document.body.appendChild(img);
};
img.error = function() {
if(window.console.log) {
window.console.log("Not loaded image from canvas.toDataURL");
} else {
alert("Not loaded image from canvas.toDataURL");
}
};
img.src = canvas.toDataURL("image/png");
}
});
};
})();
//]]>
</script>
</head>
<body>
<p>
<img alt="google maps static" src="http://maps.googleapis.com/maps/api/staticmap?center=40.714728,-73.998672&amp;zoom=12&amp;size=400x400&amp;maptype=roadmap&amp;sensor=false">
</p>
</body>
</html>
上一篇:ANDROID开发中注意不同手机CPU架构对SO文件的不同需求。


下一篇:MapleSim助力长臂挖掘机建模问题解决