Jump to content
Damon

Can no longer print pdf from Twebbrowser component and can't load to edgebrowser

Recommended Posts

Anyone else seen this behavior?  It is a recent problem.  The print button is clicked but the dialog never appears.  pdf still loads fine, but cannot print unless you save to file first.  Troublesome.

webbrowser1.Navigate('yourfile.pdf');

 

Also, Does anyone have the new TEdgeBrowser working?  I have applied the git package and got the webview2.dll in the output folder with the exe and navigate fails.  I cannot load any page.  Edge version is Version 87.0.664.52 (Official build) (64-bit)

Edited by Damon

Share this post


Link to post

This does not really help, but I can confirm that TWebBrowser can not (or no longer?) print PDF files.
Clicking the print button that's shown as an overlay does nothing. When invoking the print command manually with

 

WebBrowser1.ControlInterface.ExecWB(OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DONTPROMPTUSER, vIn, vOut) ;

it raises the error message "Trying to revoke a drop target that has not been registered". Never seen this before.

The missing print function applies to PDF files only. Regular HTML files and websites do work as advertised.

 

Share this post


Link to post
On 12/3/2020 at 5:38 PM, Damon said:

Also, Does anyone have the new TEdgeBrowser working?

For months. It works flawlessly. Keep in mind that you don't get anything from installing Edge on the target computer. You must either install the runtime, ship the needed binaries or install a beta/dev version. Explained here:

https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution

Share this post


Link to post
2 hours ago, Der schöne Günther said:

For months. It works flawlessly. Keep in mind that you don't get anything from installing Edge on the target computer. You must either install the runtime, ship the needed binaries or install a beta/dev version. Explained here:

https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution

Yes, i did try with the binaries, but it did not work.  I will try the stand alone installer, thank you for this.

Share this post


Link to post
Quote

Also, Does anyone have the new TEdgeBrowser working?

I struggled with TEdgeBrowser and the updated TWebBrowser that comes with 10.4. TEdgeBrowser did not work at all, like you experienced. TWebBrowser  still just worked in IE11 fallback mode. Latest Windows update and MS Edge/Chromium is installed.

 

What effectively solved the issue for me was to install the WebView2 runtime:

WebView2 - Microsoft Edge Developer

 

After a couple of tests, it seems to me that the runtime is also required on the client computers. It is not sufficient to just deploy WebView2Loader.dll with the application, but the target system requires the WebView2 runtime as well. Which is quite unfortunate, because that needs admin rights to install.

 

I wonder when Microsoft will ship an MS Edge/Chromium with Windows, that comes with the runtime to support an embedded TEdgeBrowser.

Edited by Alexander Halser

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×