Created
June 3, 2015 07:13
-
-
Save muffl0n/976b5d99b2128997d97e 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
var args = require('system').args; | |
var webpage = require('webpage'); | |
var page = webpage.create(); | |
var url = args[1]; | |
page.viewportSize = { | |
width: 1024, | |
height: 768 | |
}; | |
page.open(url, function () { | |
console.log(page.renderBase64('PNG')); | |
phantom.exit(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment