by Devin Yang
(This article was automatically translated.)

Published - 6 years ago ( Updated - 6 years ago )

Here I provide the execution method on Mac
Snapshot: output.png will be produced
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless\
--screenshot https://www.google.com
Print PDF: output.pdf will be output
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless\
--print-to-pdf https://www.google.com
Available parameters are listed below:
Description Useful parameters
Screenshots --screenshot
Create PDFs --print-to-pdf
Dump the DOM --dump-dom
Window size --window-size=412,732

Tags:

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


phpenv

phpenv database environment

This article describes how to pull out the database service of phpenv to an independent environment. PHPENV can define database services in SERVICE through environment variables. If necessary in the development environment, we can easily restart all services, nginx, fpm and db through commands such as ./start and ./restart. But if it is in online mode, I don't want to restart the website, even the entire DB is restarted. For example, when the php version is updated, the DB does not need to be restarted.

python

Execute system commands with python

How do I execute system commands with Python, here is a simple example

ddns,pppoe

Truly free DDNS service

If you need to use DDNS, there are too many fake free DDNS on the Internet, you can really try this one, it is really free and easy to set up. https://www.duckdns.org/DDNS is also called dynamic DNS, which allows our floating IP to obtain a domain name. In this way, we can access our floating IP host through the domain name.