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


About TTFB

TTFB (Time To First Byte): The browser is waiting for the first byte of the response. TTFB stands for time to first byte. This time includes 1 round trip delay and the time for the server to prepare a response.

ubuntu, resolv.conf

How to adjust /etc/resolv.conf settings of ubuntu

In the CentOS system, usually I directly change /etc/resolv.conf, As a result, when I wanted to change Ubuntu this time, it was indeed written.. "Don't manually change this file, or your hand will be cut off", Oh, wrong flip?, #DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN So Google found the steps at once..

linux, centos, rsnapshot

How to install rsnapshot on CentOS 7

rsnapshot is a rsync-based tool that can perform snapshot incremental backups. However, we installed which rsnapshot in CentOS. Why is there no such command? There is no way to install it with yum install rsnapshot?