by Devin Yang

建立於: 8年前 ( 更新: 8年前 )

在這裡我提供Mac上的執行方式
抓圖: 會產出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

Tags:

Devin Yang

文章內容無法一一說明,如果您有什麼不了解處,歡迎提問哦:)

No Comment

Post your comment

需要登入才可留言!

類似的文章


javascript

介紹document.designMode

document.designMode,可以控制整個document變為可編輯的。 我們透過"on"及"off"來調整。 透過document.execCommand我們能做很多事情,例如:insertText。

git,Synology

關於gitlab的docker設定分享

我朋友想研究gitlab的操作,我說用docker image不用十分鐘就裝起來了, 我家的Synology Nas上也有gitlab套件可以直接安裝。 結果,不是安裝失敗,就是修復中,或是已啟動了不能用。@@ 還被朋友嗆...

linux,raspberry

樹莓派安裝VNC Server

檢單介紹如何在樹莓派上啟動VNC Server