PageClientCaptureScreenshotAsync Method |
Version 130.1.90
Capture page screenshot.
Namespace: CefSharp.DevTools.PageAssembly: CefSharp.Core (in CefSharp.Core.dll) Version: 129.0.110.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 NullableCaptureScreenshotFormat (Optional)
- Image compression format (defaults to png).
- quality NullableInt32 (Optional)
- Compression quality from range [0..100] (jpeg only).
- clip Viewport (Optional)
- Capture the screenshot of a given region only.
- fromSurface NullableBoolean (Optional)
- Capture the screenshot from the surface, rather than the view. Defaults to true.
- captureBeyondViewport NullableBoolean (Optional)
- Capture the screenshot beyond the viewport. Defaults to false.
- optimizeForSpeed NullableBoolean (Optional)
- Optimize image encoding for speed, not for resulting size (defaults to false)
Return Value
TaskCaptureScreenshotResponsereturns System.Threading.Tasks.Task<CaptureScreenshotResponse>
See Also