How can I manipulate and preset the WebView2 PDF toolbar Fit to width or Fit to page setting?
Fit to width seems to be the default but I would like to be able to persit the user preference.
Also how do we know if the user interacts with the PDF toolbar options? For example did they Print the PDF or Save the PDF. Can we listen to these PDF toolbar button events?
Im using the WebView2 in a WinUI 3 desktop app.
private async void Page_Loaded(object sender, RoutedEventArgs e)
{
await TheWebView.EnsureCoreWebView2Async();
// 2 - Show PDF/Web page using Source
string PdfPath = @"C:\Users\teddy\pdf\confirmation1.pdf";
Uri targetUri = new Uri(PdfPath);
TheWebView.Source = targetUri;
...