brenden / node-webshot

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

When page takes a lot of time to load image is not generated #146

Open apur opened 8 years ago

apur commented 8 years ago

Hi,

We have a page which is generated dynamically and is also image intensive. Hence it takes a long time to load and image is not generated, on a 16 kb image is generated. Kindly help. image

apur commented 8 years ago

I have specified the following options, it does not finish executing. var options = { width: 'all', height: 'all', renderDelay: 10000 };

rajibbrunel commented 7 years ago

there is increase renderDelay around 1 minute 60000 . I think u can get the image ... another thing u can do to use callback function var options = { quality: 80, screenSize: { width: 1024, height: 768 }, shotSize: { width: 960, height: 537 }, siteType: 'url', phantomConfig: { 'ignore-ssl-errors': 'true', 'ssl-protocol': 'any' }, streamType: 'jpg', // errorIfStatusIsNot200: true, takeShotOnCallback: true,

  onLoadFinished: function() {
    window.callPhantom('takeShot');
  },
  renderDelay: 70000,
  timeout: 360000
};
impactcolor commented 5 years ago

You can call it once a certain element on the page loads, so it won't matter how long it takes. captureSelector: '#your_Id',