Skip to content

Instantly share code, notes, and snippets.

@paulmars
Created April 30, 2013 19:35
Show Gist options
  • Select an option

  • Save paulmars/5491298 to your computer and use it in GitHub Desktop.

Select an option

Save paulmars/5491298 to your computer and use it in GitHub Desktop.
How to take a huge screen show of mbostock's work
phantomjs screenshot.js
var viewportSize = {width: 10000, height: 3000};
var page = require('webpage').create();
page.viewportSize = viewportSize;
page.open('http://bl.ocks.org/mbostock/1062288', function () {
page.zoomFactor = 15.0;
setTimeout(function(){
page.render('mbostock_15.png');
phantom.exit();
}, 3000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment