viewport
Type: <object>
It sets browser visible area settings and device capabilities over the target url.
- CLI
- JavaScript
- Shell
- Python
- Ruby
microlink 'https://en.wikipedia.org/wiki/Bob_Dylan&screenshot=true&viewport.width=640&viewport.height=400&viewport.deviceScaleFactor=2&viewport.isMobile=true'
The default viewport values are provided by the default device. The viewport should be defined by:
width
<number>: The page width in pixelsheight
<number>: The page height in pixels.deviceScaleFactor
<number>: Specify device scale factor.isMobile
<boolean>: Whether the meta viewport tag is taken into account.hasTouch
<boolean>: Specifies if viewport supports touch events.isLandscape
<boolean>: Specifies if viewport is in landscape mode.
If you just provide an incomplete set of viewport values, they will be merged with the default values:
- CLI
- JavaScript
- Shell
- Python
- Ruby
microlink 'https://en.wikipedia.org/wiki/Bob_Dylan&screenshot=true&viewport.deviceScaleFactor=0.5'
See device for using viewport presets.