0

I use TChromium (CEF4) with Delphi 10.3.3 and need to make a screenshot of the loaded page, not just the part visible.

With TWebBrowser, I could just resize the browser to the length of the document via iHtmlDocument2, but I need to do it using TChromium and cant find any function/property/documentation about it.

The TakeSnapshot function of chromium only create a snapshot of the visible area.

  • Maybe [this](https://stackoverflow.com/q/23755232/327083)? – J... Jan 14 '20 at 13:33
  • Unfortunately no, it also only make a screenshot of the visible area, not of the whole document. I can do that with TWebBrowser, but the browser has other issues (not rendering pages correct), so I intent to use TChromium (or better, I have to). –  Jan 15 '20 at 15:08
  • @Softtouch: does the webpage render correctly in IE11? – whosrdaddy Jan 16 '20 at 09:16
  • @whosrdaddy yes, it render fine, BUT, using TWebBrowser, it popup dialogs regarding certificate errors etc. on some webpages (Chromium doesn't do that for the same pages) and that are not javascript popups, but real dialogs and they prevent the program from continuing automatically. –  Jan 16 '20 at 11:25
  • thats because twebbrower operates by default in IE7 mode. You have to add a registry key to put in IE11. look for Feature_emulation flag here on SO. – whosrdaddy Jan 16 '20 at 11:49
  • I did that, but it does not change anything. The test exe is Project1.exe, so I add the registry key for Project1.exe with DWORD 11000, I also tried 11001 and its exactly the same. –  Jan 16 '20 at 16:52
  • I used to do this with [OleDraw](https://learn.microsoft.com/en-us/windows/win32/api/ole/nf-ole-oledraw) on TWebBrowser, I wonder wether CEF supports this also? – Stijn Sanders Jan 19 '20 at 20:19

0 Answers0