by Devin Yang
(This article was automatically translated.)

Published - 7 years ago ( Updated - 7 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


d-laravel,docker

D-Laravel v1.2.1 version change description (recommended update, must avoid stepping on thunder)

D-Laravel v1.2.1 revision instructions use GuzzleHttp\Client; When posting, there is an access denied problem. If you are upgrading from an older version, you may need to adjust the configuration file in etc/default-ssl.conf (if there is one) Please adjust php:9000 to web:9000, you can adjust it by executing ./console secure once. In the docker-compose configuration file, change the PHP-FPM container to network_mode: "service:web"...

docker,Synology

How to modify the logging driver of Docker on Synolog NAS

On my Synolog Nas, a strange logging driver named db is running by default, how to modify it to a normal json-file? In Synolog's Nas, his Daemon config file is special, and it is placed in the /var/packages/Docker/etc/ directory. Called dockerd.json.

vpn,cli,macos

How do I dial a VPN from the command line on MacOS

I myself will need to use MacOS to dial VPN in the command line. Here I provide my alias and setting method