Hi Arthur,
I found it very helpful to use the following code in the Open() event of the application ( I was recommended to do that by Appeon Support) (it has to be in the open of the application object):
// v3, mjl, 18/06/21: seems to be a necessary setting for CEF webbrowser control:
int li_ret
string ls_ret
li_ret = WebBrowserGet("UserAgent", ref ls_ret)
if ls_ret = "" then
li_ret = WebBrowserSet("UserAgent", "AppeonWebBrowser")
if li_ret <> 1 then
Messagebox("Information", "Error setting the UserAgent for the WebBrowser", information!)
end if
end if
// v4, mjl, 05/07/21: avoid an existing Appeon bug of blowing up when using the webbrowser control on Windows Server 2012 R2:
open(w_wbrowser_dummy)
close(w_wbrowser_dummy)
string ls_docFolder
n_filesys lnf
ls_docFolder = lnf.of_getfolderpath(CSIDL_PERSONAL)
li_ret = WebBrowserSet("DownloadPath", ls_docFolder)
if li_ret <> 1 then
Messagebox("Information", "Error setting the DownloadPath for the WebBrowser", information!)
end if
li_ret = WebBrowserSet("allow-file-access-from-files", "true")
if li_ret <> 1 then
Messagebox("Information", "Error setting the FileAccess for the WebBrowser", information!)
end if
The w_wbrowser_dummy is a tiny child window with the visible attribute un-checked. (so invisible). Opening it and closing it avoids a blow-up on Windows Server 2012, when exiting the application (no problem on 2016).
Hope it might help your problem. If it doesn't, I'd think of when opening or saving a pdf file, you probably are changing the internal current directory to be set to anything else the where your application resides. Depending on if you use a runtime install or relative path to where the runtime dlls are, this might maybe cause the Cef folder no longer being found.
regards.