electron-render-service
electron-render-service copied to clipboard
headless chrome
Now that headless is about to appear in v59 of Chrome are you going to switch so xvfb can be dropped? It doesn't have paper size etc but that is in review afaik so v60 should be a good bet
If I have time, but it definitely would be a new project as I would:
- Base the docker image on Node Alpine with Chromium installed
- Use https://github.com/cyrus-and/chrome-remote-interface/
- Rewrite API bit in Koa v2 using async
- Maybe just do PDF generation (haven't used image part much)
The PDF options patch should get a code review tomorrow - https://codereview.chromium.org/2829973002/#ps20001
Why do you want the remote interface for that? Just calling the headless chrome instance will spit out the pdf and that's it. Can be served right away without any intermediate scripts.
Should drop waitForText
parameter support then (and anything else that operates with page scripting).
Overall PDF generation is getting more trivial to tailor into one's microservice.
You're right. Forgot about that. Things are getting very neat.
I am an avid user of the waitForText
option; if it would be dropped does that mean there is a replacement in headless Chrome or would it be simply gone, then?
I would want to maintain feature parity, otherwise one could just use headless CLI directly. waitForText
is doable and exactly in the same way as in Electron - https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-searchInResource
Looks like we could add regexp support.
May be inspired by https://github.com/esbenp/pdf-bot