mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
5fc136eec1
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
4.1 KiB
4.1 KiB
sidebar_label |
---|
ScreenshotOptions |
ScreenshotOptions interface
Signature:
export interface ScreenshotOptions
Properties
Property | Modifiers | Type | Description | Default |
---|---|---|---|---|
captureBeyondViewport | optional |
boolean | Capture the screenshot beyond the viewport. | true |
clip | optional |
ScreenshotClip | An object which specifies the clipping region of the page. | |
encoding | optional |
'base64' | 'binary' | Encoding of the image. | binary |
fromSurface | optional |
boolean | Capture the screenshot from the surface, rather than the view. | true |
fullPage | optional |
boolean | When true , takes a screenshot of the full page. |
false |
omitBackground | optional |
boolean | Hides default white background and allows capturing screenshots with transparency. | false |
path | optional |
string | The file path to save the image to. The screenshot type will be inferred from file extension. If path is a relative path, then it is resolved relative to current working directory. If no path is provided, the image won't be saved to the disk. | |
quality | optional |
number | Quality of the image, between 0-100. Not applicable to png images. |
|
type | optional |
'png' | 'jpeg' | 'webp' | png |