1 var page = require('webpage').create(),
2 system = require('system');
4 var url = system.args[1] || 'http://www.indexdata.com/';
5 var file_png = system.args[2] || 'indexdata.png';
7 if (system.args.length === 1) {
8 console.log('Usage: screenshot.js <some URL> <file.png>');
12 // page.paperSize = { format: 'A4', orientation: "landscape" };
13 // page.zoomFactor = 1.0;
19 page.open(url, function () {
21 setTimeout(function () {
22 page.render(file_png);