标签:h5截图功能!
var page = require(‘webpage‘).create();
var args = require(‘system‘).args;
var url = args[1];
var filename = args[2];
var cliptop = args[3];
var clipleft = args[4];
var clipwidth = args[5];
var clipheight = args[6];
// letf : 0,
// width : 1000,
// height : 410
page.viewportSize = { width: 1000, height: 480 };
page.clipRect = {
top : cliptop,
left : clipleft,
width : clipwidth,
height : clipheight
};
page.open(url, function () {
window.setTimeout(function () {
page.render(filename);
phantom.exit();
}, 15000);
});
标签:h5截图功能!
原文地址:http://tianbin.blog.51cto.com/10559580/1686342