3 ms·
Sharing in case anyone isn't familiar with this built-in capability: google-chrome --headless --screenshot=my_screenshot.png https://www.example.com https://ww
by xnx 11mo ago
Sharing in case anyone isn't familiar with this built-in capability:
google-chrome --headless --screenshot=my_screenshot.png https://www.example.com https://www.example.com
- stronglikedan 11mo agoThis is for the dozen or so people that don't have Chrome installed.
- nabeards 11mo agoI personally haven't had Chrome installed anywhere in years. I think there are more than a dozen of us!
- DemocracyFTW2 11mo ago(checks list) --Mh, yah so, you've got a point there (scribbles, smiles, extends hand) --Welcome dear Sir or Madam, or, as we will call you, Number Thirteen!
- thekevan 11mo agoI have this PC for over 2 years and did not realize I didn't have Chrome installed until Google's Antigravity prompted me to do so for its agent. So it's installed now but still un-personalized like it was installed 5 minutes ago. I don't use it except with Antigravity.
- Lord_Zero 11mo agoIt looks like this app has helpful functions for size, format, and transparency that you can't do with the built in chrome command all at once without probably piping it through inagemagik or something. And even then maybe this site renders the html responsively before rasterizing.
- fuzzy2 11mo agoActually Chrome does everything. Not via command-line switches however, you need to use the DevTools protocol. For example using Playwright. You get PDFs and PNGs of any size and resolution (PPI). And I guess this is exactly what this service does under the hood.
- Lord_Zero 10mo agoThis is interesting. If I have DevTools open, is there JS I can run to execute the PNG generation?
- remify 11mo agoAt work we are using this feature. A lot of time we need to do some kind of pdf reporting. We built them as html pages and print them as pdf. Works fine.
- threecheese 11mo agoBut is this “production-ready”?