Skip to content

Instantly share code, notes, and snippets.

@james2doyle
Created October 1, 2025 16:13
Show Gist options
  • Select an option

  • Save james2doyle/6e8fe4781c68324042ff0e505f547e36 to your computer and use it in GitHub Desktop.

Select an option

Save james2doyle/6e8fe4781c68324042ff0e505f547e36 to your computer and use it in GitHub Desktop.
An example of printing headless with Google Chrome from the CLI
/path/to/chrome --headless \
--disable-gpu \
--no-pdf-header-footer \
--hide-scrollbars \
--print-to-pdf-margins="0,0,0,0" \
--print-to-pdf \
--window-size=1280,720 \
https://example.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment