alvarcarto / url-to-pdf-api

Web page PDF/PNG rendering done right. Self-hosted service for rendering receipts, invoices, or any content.
MIT License
7.03k stars 779 forks source link

scrollPage bug #52

Open zhuang-hao-ming opened 6 years ago

zhuang-hao-ming commented 6 years ago

There are some websites such as example using a special lazy loading strategy.

When users scroll quickly(<300ms) they do not load image. Just when users stop to look at the content they load image.

So, I think that we need another option (scrollInterval) to let user to test and decide the interval.

releated discussions:

https://github.com/GoogleChrome/puppeteer/issues/338#issuecomment-333301117

Thanks!

kimmobrunfeldt commented 6 years ago

Good feedback. I'm open for a PR to implement this.

sreejithpc commented 4 years ago

Simply we can use : await page.goto('URL', { waitUntil: 'networkidle0' }); this will wait until the complete page is loaded.