Saving a webpage to a PDF is literally one command line away:
chromium --headless --disable-gpu --print-to-pdf=google.pdf http://google.com/
What does Apify add in this case?
chromium --headless --disable-gpu --print-to-pdf=google.pdf http://google.com/
What does Apify add in this case?
chromepdf() {
chrome --headless --disable-gpu --print-to-pdf="$1" $2
}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.
Edit, I see now that I replied to the wrong comment. It was meant to they who made an alias to it.
Looks like there are a lot of options available for this. I suspect Apify's using one of them.
It's robust because the modern web is pretty much built for Chrome, although it can be resource-intensive if you're archiving many sites.