Created
October 1, 2025 16:13
-
-
Save james2doyle/6e8fe4781c68324042ff0e505f547e36 to your computer and use it in GitHub Desktop.
An example of printing headless with Google Chrome from the CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /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