I can take a screenshot of the page using headless chrome, while specifying the exact dimensions:
chrome --headless --disable-gpu --screenshot --window-size=1920,1080 https://example.com/
How to make the screenshot height automatically adjust to the actual content height? I need to get something like: --window-size = 1920, auto