PageClientCaptureScreenshotAsync Method |
Version 112.3.0
Capture page screenshot.
Namespace:
CefSharp.DevTools.Page
Assembly:
CefSharp.Core (in CefSharp.Core.dll) Version: 112.3.0.0
Syntax public Task<CaptureScreenshotResponse> CaptureScreenshotAsync(
CaptureScreenshotFormat? format = null,
int? quality = null,
Viewport clip = null,
bool? fromSurface = null,
bool? captureBeyondViewport = null,
bool? optimizeForSpeed = null
)
public:
Task<CaptureScreenshotResponse^>^ CaptureScreenshotAsync(
Nullable<CaptureScreenshotFormat> format = nullptr,
Nullable<int> quality = nullptr,
Viewport^ clip = nullptr,
Nullable<bool> fromSurface = nullptr,
Nullable<bool> captureBeyondViewport = nullptr,
Nullable<bool> optimizeForSpeed = nullptr
)
Parameters
- format (Optional)
- Type: SystemNullableCaptureScreenshotFormat
Image compression format (defaults to png). - quality (Optional)
- Type: SystemNullableInt32
Compression quality from range [0..100] (jpeg only). - clip (Optional)
- Type: CefSharp.DevTools.PageViewport
Capture the screenshot of a given region only. - fromSurface (Optional)
- Type: SystemNullableBoolean
Capture the screenshot from the surface, rather than the view. Defaults to true. - captureBeyondViewport (Optional)
- Type: SystemNullableBoolean
Capture the screenshot beyond the viewport. Defaults to false. - optimizeForSpeed (Optional)
- Type: SystemNullableBoolean
Optimize image encoding for speed, not for resulting size (defaults to false)
Return Value
Type:
TaskCaptureScreenshotResponsereturns System.Threading.Tasks.Task<CaptureScreenshotResponse>
See Also