建立於: 6年前 ( 更新: 6年前 )
在這裡我提供Mac上的執行方式
抓圖: 會產出output.png
抓圖: 會產出output.png
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless \
--screenshot https://www.google.com
列印PDF: 會產出output.pdf
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless \
--print-to-pdf https://www.google.com
以下列出可用參數:
說明 | 有用的參數 |
---|---|
Screenshots | --screenshot |
Create PDFs | --print-to-pdf |
Dump the DOM | --dump-dom |
Window size | --window-size=412,732 |
No Comment
Post your comment