Jul 21, 2017 · 1 min read
I believe I found the solution to the forceViewport thing, if you use setDeviceMetricsOverride you’re good to go.
Code:
await Emulation.setDeviceMetricsOverride({width: device.width, height:height, screenWidth: device.width, screenHeight: height, deviceScaleFactor: 1, fitWindow: false, mobile: false});
await Emulation.setPageScaleFactor({pageScaleFactor:1});Full blog post: https://jonathanmh.com/taking-full-page-screenshots-headless-chrome/
