Installing headless Chrome on Ubuntu

Install Chromium (headless Chrome) on Ubuntru

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:canonical-chromium-builds/stage
sudo apt-get update
sudo apt-get install chromium-browser

Creating screenshot:

chromium-browser --headless --hide-scrollbars --no-sandbox --window-size=1280,1024 --screenshot=screenshot.pdf http://example.org/

Saving a page to PDF:

chromium-browser --headless --hide-scrollbars --print-to-pdf=page.pdf https://example.com/

References:


ops

Somewhat related: