Click or drag to resize

ChromiumWebBrowserCaptureScreenshotAsync Method

Version 99.2.120
Capture page screenshot.

Namespace:  CefSharp.OffScreen
Assembly:  CefSharp.OffScreen (in CefSharp.OffScreen.dll) Version: 99.2.120.0 (99.2.120.0)
Syntax
public Task<byte[]> CaptureScreenshotAsync(
	CaptureScreenshotFormat? format = null,
	int? quality = null,
	Viewport viewport = null
)

Parameters

format (Optional)
Type: SystemNullableCaptureScreenshotFormat
Image compression format (defaults to png).
quality (Optional)
Type: SystemNullableInt32
Compression quality from range [0..100] (jpeg only).
viewport (Optional)
Type: CefSharp.DevTools.PageViewport
view port to capture, if not null the browser will be resized if the requested width/height are larger than the current browser Size.

Return Value

Type: TaskByte
A task that can be awaited to obtain the screenshot as a byte[].
See Also