Skip to content

Instantly share code, notes, and snippets.

@ozw-sei
Created August 6, 2015 09:21
Show Gist options
  • Save ozw-sei/f9ce5b867e98e067b3e2 to your computer and use it in GitHub Desktop.
Save ozw-sei/f9ce5b867e98e067b3e2 to your computer and use it in GitHub Desktop.
//Phantomjsを使ってPDFをエクスポートしてみた
var phantom = require('phantom')
phantom.create(function(ph){
ph.createPage(function(page) {
page.open("http://www.google.com", function(status) {
page.render('google.pdf', function(){
console.log('Page Rendered');
ph.exit();
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment