Created
October 1, 2014 22:38
-
-
Save brian-gates/74870e98706f96f27d79 to your computer and use it in GitHub Desktop.
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 WebPage = require('webpage'); | |
page = WebPage.create(); | |
page.viewportSize = { width: 1920, height: 1200 }; | |
phantom.addCookie({ | |
name : 'access_token', | |
value : '08cd1e32-16dd-4b99-b976-e3bb8c922421', | |
domain : '/', | |
}); | |
var url = 'http://localhost:8000/reports/acquisition/1411772400000'; | |
page.open(url); | |
page.onLoadFinished = function() { | |
page.render('screenshot.pdf'); | |
phantom.exit(); | |
}; | |
page.onConsoleMessage = function(msg, lineNum, sourceId) { | |
console.log(msg); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment