-
-
Save zither/43f5eb3b8d8cf280b039c5d1f693c022 to your computer and use it in GitHub Desktop.
phantomjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: phantomjs c.js | |
var page = require('webpage').create(); | |
var url = 'c.html'; | |
page.open(url, function(status){ | |
window.setTimeout(function () { | |
var height = page.evaluate(function(){ | |
return document.body.scrollHeight; | |
}); | |
page.clipRect = {top: 0, left: 0, width: 406, height: height}; | |
page.render('c.png', {quality: 90}); | |
phantom.exit(); | |
}, 200); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment