0

CoreWebView2 exposes methods like ShowPrintUI which I'd like to utilize.

However, it seems that RAD Studio, even in the latest version 11.3 has hpp files from a pretty old build - 1.0.1054.31 from 2021, at least that is shown in the GetIt Package Manager. This has not been updated for a very long time and Embarcadero seems to be very slow in updating this.

It appears that the ShowPrintUI requires at least 1.0.1518.46 version of the SDK.

Is there a way to add those headers to the current C++ Builder installation, or at least the relevant part for using CoreWebView2.ShowPrintUI() or CoreWebView2.PrintAsync() and how specifically?

I already know about the workaround to execute JavaScript like window.print() which I do not want to use as a solution as it doesn't pop up a new window but shows the user interface inside of the TEdgeBrowser window.

I am guessing that, if newer headers would be available the usage would be as easy as:

EdgeBrowser1->DefaultInterface->ShowPrintUI();

Per support reply by Embarcadero representative, they plan to update headers in the future major release, but I'd like to avoid the wait as I also have to use this in an older version of C++ Builder.

Coder12345
  • 3,431
  • 3
  • 33
  • 73
  • There are corresponding examples for these two APIs in the [official documentation](https://learn.microsoft.com/en-us/microsoft-edge/webview2/how-to/print?tabs=win32cpp#the-showprintui-method-to-open-a-print-dialog), have you referred to them? – Xudong Peng Aug 21 '23 at 09:27
  • For the examples to work I have to have updated headers. The question was about updating headers, not about examples how to use ShowPrintUI. – Coder12345 Aug 21 '23 at 14:35
  • If this is the case, you can contact the WebView2 team and send your feedback, as mentioned in [this doc](https://learn.microsoft.com/en-us/microsoft-edge/webview2/contact#submit-feature-requests-or-bugs-in-the-webview2feedback-repo). – Xudong Peng Aug 22 '23 at 08:32
  • @XudongPeng My question is about C++ Builder headers, have you read that? – Coder12345 Aug 22 '23 at 17:45
  • It looks like I misunderstood your question, are you referring to precompiled header files? – Xudong Peng Aug 23 '23 at 06:16
  • I am talking about `WebView2.hpp` – Coder12345 Aug 23 '23 at 16:30

0 Answers0