Capture URL Screenshot Chrome+Windows
Capturing a screenshot in Linux/macOS is documented and can be done in a single command as detailed here
Doing this in Windows is a lot less clear and more painful, but you can do it like so I am not running with administrator rights so this may be slightly different, easier for you if you are .
The key in Windows it seems is to use the start
command. Wish that had been more clear, but then if you are on Windows they want you to use PowerShell (ewww)
Setup
I am assuming you have installed Chrome on your machine. After you have installed Chrome run the following command to make sure that it is registered properly for your particular user, because there are a variety of places Chrome could get installed on your machine depending on your user and permissions like these are some of the places it could be.
%ProgramFiles%\Google\Chrome\Application\chrome.exe
%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe
%LocalAppData%\Google\Chrome\Application\chrome.exe
Which is why I think you should go with the registered instance for your particular use approach like so.
Launch command window Win + R
, type cmd
Copy paste the following command into the opened window start "" chrome
like so
A new blank Chrome window will appear
Capture Command
Example here is I am going to capture my blog https://siliconheaven.info
in headless mode as the file siliconheaven.png
saved into my user specific TEMP folder
start "" chrome.exe --headless --hide-scrollbars --window-size=1920,2000 --screenshot="%TEMP%\siliconheaven.png" https://siliconheaven.info/
Now open the capture image file to confirm with the default application on your machine to open png
files
start "" "%TEMP%\siliconheaven.png"
Addendum
If you want to have a nicer way to capture the screen contents in Windows and are ok with launching Chrome in normal mode try this
Launch
start "" chrome.exe https://siliconheaven.info/
Ctrl+Shift+I
Ctrl+Shift+P
- Type:
screenshot
and choose the second optionScreenshot Capture full size screenshot