Szpadel / chrome-headless-render-pdf

223 stars 67 forks source link

It would be great if it is possible to set delay between page load and screen capture #21

Closed jarben closed 6 years ago

jarben commented 6 years ago

Some sites have animations that need to be loaded, if would be great if there is an option where we can set number of milliseconds to wait until the screenshot is taken, for example: waitTime:2000 would wait 2s before taking a screenshot.

Szpadel commented 6 years ago

this would extend rendering time, maybe setting animation playback rate to something like 1000x could solve this issue?

jarben commented 6 years ago

The animation playback can't be controlled if this is a third party website. Is the rendering time issue when this is requested in the option? Default would be 0..

Szpadel commented 6 years ago

I can alter playback ratio for all animations on rendered page. 1 is normal speed, 0 would cause all animation to stop. Setting it to 1000 would mean that all animations would be 1000x faster, so everything should finish animating in emulated 5s, but of course I would need to test it somewhere. Do you have any page on with I could test this issue?

jarben commented 6 years ago

That would be great, here is a test link: https://goo.gl/DPfPM4

Output: image

Desired output: image

jarben commented 6 years ago

Thanks @Szpadel !