Page 1 of 2
Print Preview Crashes
Posted: Thu May 23, 2024 6:43 am
by win568neu
With CEF 123.0.13/124.3.8 the Print Preview in the Print Dialog crashes. Are there any changes, that are necessary, that the Print Preview works ? If you press print, nothing happens.
Re: Print Preview Crashes
Posted: Thu May 23, 2024 12:38 pm
by salvadordf
Hi,
This is a known issue with the alloy runtime :
https://github.com/chromiumembedded/cef/issues/3697
https://github.com/chromiumembedded/cef/issues/3686
As you can see, the CEF project is moving to the Chrome runtime and old issues are marked as "not planned".
See the MiniBrowser demo to know how to set the Chrome runtime and wait until CEF 125 is released because it includes many fixes for the new Chrome runtime.
Re: Print Preview Crashes
Posted: Mon May 27, 2024 6:26 am
by win568neu
Hi Salvador
Thanks for the hint. I looked at the information and the changes in the demos. Am I correct in assuming that tab support is not yet built in? We use our browser with multi-tab support and therefore it would not be possible to switch to ChromeRuntime. Is there still a way to re-enable printing without switching to ChromeRuntime?
Re: Print Preview Crashes
Posted: Mon May 27, 2024 1:48 pm
by salvadordf
Enabling the chrome runtime only requires a few minor code changes and you can use 99.9% of your code without modifications, including your existing multi-tab handling code.
The MiniBrowser demo is ready for chrome runtime and I'll modify a few more demos.
All the demos will use the chrome runtime by default in the future.
Re: Print Preview Crashes
Posted: Tue May 28, 2024 6:05 am
by win568neu
Hi Salvador
I tried the ChromeRuntime in my project. We use the CEF framework with a Chrome subprocess exe. Unfortunately the Project did not recognize my SubProcess Exe and and starts the main exe with every Page. Do I also have to activate ChromeRuntime when initializing the CEF for the subprocess?
Re: Print Preview Crashes
Posted: Tue May 28, 2024 2:29 pm
by salvadordf
Yes. It's necessary to set GlobalCEFApp.ChromeRuntime to True in the main project and also in the subprocess project.
CEF4Delphi is now updated to CEF 125. Please, download the latest CEF4Delphi version from GitHub and see the changes in the TabbedBrowser2 demo.
Re: Print Preview Crashes
Posted: Wed May 29, 2024 8:02 am
by win568neu
Hi Salvador
Thank you very much for your support
Re: Print Preview Crashes
Posted: Wed May 29, 2024 11:46 am
by win568neu
Hi Salvador
The Subprocess with Chromeruntime works now. PrintPreview is also available and works with Version 125. Unfortunately the Download of Files did not work as before. If i want to Download a File, a Chromium Window with the Content of the File appears. Is there a possibility, to Download the Files like in the older version ?
Re: Print Preview Crashes
Posted: Wed May 29, 2024 1:10 pm
by win568neu
Hi Salvador
Further testing showed that the normal download of the files worked as always. However, if these are PDF files, the changes that I have adopted from the demos are no longer called up internally in the PDF viewer. The code in BeforePopup can be removed as the old behavior continues to work
Re: Print Preview Crashes
Posted: Wed May 29, 2024 3:32 pm
by salvadordf
Try setting TChromiumCore.DownloadBubble to STATE_DISABLED.
The old events to control the the downloads work but read the code comments for TChromiumCore.OnBeforeDownload to set the aResult value correctly. See the MiniBrowser demo.
Please, provide all the details about PDF issues to reproduce them in my computer.