puppeteer/website/versioned_docs/version-21.6.1/api/puppeteer.screenshotoptions.md
release-please[bot] dd750b9576
chore: release main (#11546)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2023-12-13 15:19:18 +01:00

5.2 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. false if there is no clip. true otherwise.
clip optional ScreenshotClip Specifies the region of the page to clip.
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
optimizeForSpeed optional boolean 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'