Hacker News new | ask | show | jobs
by sgolestane 3154 days ago
Is there anyway to make chrome wait until the page loads?
1 comments

Looks like it prints automatically once Page.loadEventFired is triggered.

Alternatively, you can run Chrome headless with the remote debugging API (--remote-debugging-port=9222) and send a Page.printToPDF (https://chromedevtools.github.io/devtools-protocol/tot/Page/...) after some delay.