puppeteer/website/versioned_docs/version-21.3.8/api/puppeteer.screenshotoptions.md
release-please[bot] ddbb43cd09
chore: release main (#11086)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2023-10-06 11:48:06 +00:00

4.5 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 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'