By now ,I can only capture the current window to a picture by the codes like this:
Dim ImageStream As Stream = New FileStream("d:\ttt.png", FileMode.OpenOrCreate, FileAccess.Write)
WebView21.CoreWebView2.CapturePreviewAsync(Microsoft.Web.WebView2.Core.CoreWebView2CapturePreviewImageFormat.Png, ImageStream)
Can anybody tell me how to capture the whole page to a picture?Thanks!
Hi
@cm
,
There's a DevTools Protocol method for that:
Page.captureScreenshot
You can refer to this issue to use it.
https://github.com/MicrosoftEdge/WebView2Feedback/issues/733
Hope the above content can be helpful to you.
Best Regards.
Jiachen Li
----------
If the answer is helpful, please click "
Accept Answer
" and upvote it.
Note: Please follow the steps in our
documentation
to enable e-mail notifications if you want to receive the related email notification for this thread.