var page = require('webpage').create(); page.viewportSize = {width: , height: }; page.open('', function (status) { if (status !== 'success') { console.log('Unable to load the address!'); phantom.exit(1); } page.evaluate(function() { }); setTimeout(function() { page.render(''); phantom.exit(); }, 0); });