Click or drag to resize

ChromiumWebBrowserCaptureScreenshotAsync Method

Version 130.1.90
Capture page screenshot.

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

Parameters

format  NullableCaptureScreenshotFormat  (Optional)
Image compression format (defaults to png).
quality  NullableInt32  (Optional)
Compression quality from range [0..100] (jpeg only).
viewport  Viewport  (Optional)
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

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