Giter VIP home page Giter VIP logo

Comments (5)

hafedh-trimeche avatar hafedh-trimeche commented on September 13, 2024

Solved!
dxil.dll not included inside the directory.

from cef4delphi.

hafedh-trimeche avatar hafedh-trimeche commented on September 13, 2024

Now these errors are reported:

[0406/214708.185:ERROR:network_change_notifier_win.cc(267)] WSALookupServiceBegin failed with: 0
[0406/214708.189:ERROR:core_audio_util_win.cc(316)] Failed to create Core Audio device enumerator on thread with ID 16580
[0406/214709.525:ERROR:network_change_notifier_win.cc(267)] WSALookupServiceBegin failed with: 0
[0406/214711.463:ERROR:network_change_notifier_win.cc(267)] WSALookupServiceBegin failed with: 0
[0406/214711.466:ERROR:core_audio_util_win.cc(316)] Failed to create Core Audio device enumerator on thread with ID 27864
[0406/214712.941:ERROR:network_change_notifier_win.cc(267)] WSALookupServiceBegin failed with: 0
[0406/214729.026:ERROR:network_change_notifier_win.cc(267)] WSALookupServiceBegin failed with: 0
[0406/214729.030:ERROR:core_audio_util_win.cc(316)] Failed to create Core Audio device enumerator on thread with ID 13344
[0406/214730.395:ERROR:network_change_notifier_win.cc(267)] WSALookupServiceBegin failed with: 0

from cef4delphi.

salvadordf avatar salvadordf commented on September 13, 2024

It seems Chromium can't use the Core Audio API
https://source.chromium.org/chromium/chromium/src/+/main:media/audio/win/core_audio_util_win.cc;drc=f97f0d76be0b54403ef09d45f130c7aeec3798f9;l=352

And it doesn't know if the user is online
https://source.chromium.org/chromium/chromium/src/+/main:net/base/network_change_notifier_win.cc;l=267;bpv=0;bpt=1

Check that all the contents of the Release and Resources directories were copied to the application directory or in the directories indicated by GlobalCEFApp.FrameworkDirPath, GlobalCEFApp.ResourcesDirPath and GlobalCEFApp.LocalesDirPath.

from cef4delphi.

hafedh-trimeche avatar hafedh-trimeche commented on September 13, 2024

Hello,

Problem solved by setting DisableBackgroundNetworking to True and EnableMediaStream to False.

procedure CreateGlobalCEFApp;
begin
  GlobalCEFApp := TCefApplication.Create;
  with GlobalCEFApp do
  begin
    OnContextInitialized             := DoOnContextInitialized;

    AllowFileAccessFromFiles         := True;
    BlinkSettings                    := 'hideScrollbars=true,scrollAnimatorEnabled=false';
    DeleteCache                      := True;
    DeleteCookies                    := True;
    DisableBackForwardCache          := True;
    DisableBackgroundNetworking      := True;
    DisableComponentUpdate           := True;
    DisableImageLoading              := True;
    DisableJavascriptAccessClipboard := True;
    DisableJavascriptDomPaste        := True;
    DisableSpellChecking             := True;
    EnableGPU                        := False;
    EnableMediaStream                := False;
    EnableUsermediaScreenCapturing   := False;
    IgnoreCertificateErrors          := True;
    MultiThreadedMessageLoop         := False;
    MuteAudio                        := True;
    NoSandbox                        := True;
    PersistSessionCookies            := False;
    PersistUserPreferences           := False;
    SetCurrentDir                    := True;
    ShowMessageDlg                   := False;
    SmoothScrolling                  := STATE_DISABLED;
    TouchEvents                      := STATE_DISABLED;
    WindowlessRenderingEnabled       := True;

    if LogFile<>'' then
    begin
      ForceDirectories(ExtractFileDir(LogFile));
      LogFile     := LogFile;
      LogSeverity := LOGSEVERITY_ERROR;
    end;
  end;
end;

Would these parameters be tweaked to use this control only for converting HTML to PDF (Browser features not needed)?

Best regards.

from cef4delphi.

salvadordf avatar salvadordf commented on September 13, 2024

The ConsoleBrowser2 demo uses a similar browser configuration to save the webpage as an image instead of a PDF but you can use similar GlobalCEFApp properties.

Setting GlobalCEFApp.MultiThreadedMessageLoop to False may require using a message pump (TCEFWorkScheduler or TFMXWorkScheduler) or using the "views" framework among other things. The default GlobalCEFApp.MultiThreadedMessageLoop value is the recommended setting for Windows applications.

from cef4delphi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.