brenden / node-webshot

Easy website screenshots in Node.js
2.12k stars 286 forks source link

Unable to take screenshot of some websites #116

Open rahul-desai3 opened 9 years ago

rahul-desai3 commented 9 years ago

The full height screenshots for cordbloodbanking.com and cordbloodguide.com are not perfect. It is missing some styling and the content loaded by AJAX. cordbloodguide.com has no AJAX content but it is running on PythonSimpleHTTPServer.

My code is pretty similar to your basic.js demo.

var webshot = require('../lib/webshot');

webshot('cordbloodbanking.com', './cordbloodbanking.com.png', { shotSize: { width: 1024, height: 'all' } }, function(err) {
  if (err) return console.log(err);
  console.log('OK');
});

How do I fix this?

malexdev commented 8 years ago

Not sure if you're still having this issue, but from the readme:

Specify the following option in your webshot params: {takeShotOnCallback: true}. In your page once you're finished with all your AJAX, run window.callPhantom('takeShot');.

rahul-desai3 commented 8 years ago

@codechimera Sorry, I am not working on that project anymore. If those parameters fix this, this issue can be closed.