cefsharp

Solution for silent-kiosk print on CefSharp?

给你一囗甜甜゛ 提交于 2019-12-12 03:03:52
问题 I want to print my web page silently ( to default printer) with "window.print()" command on CefSharp. CefSharp handles the documents and print very good but i can't prevent printer dialog screen. Is there any option or method to prevent printerdialog ? DotNetBrowser provides silent print functionality but it has page scrolling problem and it is slower than ChefSharp. Thanks 来源: https://stackoverflow.com/questions/40115552/solution-for-silent-kiosk-print-on-cefsharp

Using CefSharp with Owin TestServer

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 01:41:26
问题 Due to potential firewall limitations and the need to have many instances of my app that cannot be competing for ports, I would like to use the Microsoft.Owin.Testing.TestServer class to create an in-memory web server that will serve requests to an embedded CefSharp browser (either WPF or Winforms is fine). I can create the TestServer with no issues. How can I configure the CefSharp WebBrowser control to use that Test Server rather than using the standard OS network stack? If I was forming my

CefSharp how to store cookies

天涯浪子 提交于 2019-12-12 01:23:02
问题 I can't get cookies to save in CefSharp. Here is what I tried: CefSettings settings = new CefSettings(); string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); Cef.Initialize(new CefSettings()); settings.RemoteDebuggingPort = 8088; settings.CachePath = path; I'm using the desktop just to test it but I tried others as well. This is the solution others got but I can't get it to work: Set CefSettings.CachePath directory. Settings are passed to Cef.Initialize() . The answer

Ajax not working in CefSharp based WebView with local files

寵の児 提交于 2019-12-11 19:23:46
问题 I have successfully embedded CefSharp in win form application using VS-2008 i am loading a jQueryMobile based webpage in webView which uses #id based ajax calls. which are not working in webView. Is there any way to disable the security so i can load local files in the webview ? 回答1: got the answer by my self just needed a single line to do it _browserSettings.FileAccessFromFileUrlsAllowed = true; 来源: https://stackoverflow.com/questions/24291510/ajax-not-working-in-cefsharp-based-webview-with

CefSharp in VSTO Addin

隐身守侯 提交于 2019-12-11 18:04:14
问题 I'm trying to use CefSharp WindowForm Control in the VSTO Excel Addin. The CefSharp.WinForms version is 75.1.142 and I'm making an addin on Excel 2013 (64 Bit) through VS 2017. I'm getting FileNotFoundException: 'Could not load file or assembly 'CefSharp, Version=75.1.142.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138' or one of its dependencies. The system cannot find the file specified.' on the below code execution. public void InitBrowser() { var cefSettings = new CefSettings();

using fody/costura in a project with cefsharp

核能气质少年 提交于 2019-12-11 17:08:01
问题 Currently I have a problem Failed to launch GPU process. while executing exe process where cefsharp is used. Here is what i observe: i take exe that is being produced with config file and copy it to a new folder starting executable creates a folder C:\Users\currentuser\AppData\Local\Temp\Costura\60B52F2D9303A2A6B945E41F3A43E7AC\32 with all files that are required by cefsharp The program throws an error Failed to launch GPU process. now, if I copy all files from Costura...\32 folder into the

Proxy for only one browser with CefSharp Offscreen

…衆ロ難τιáo~ 提交于 2019-12-11 16:56:02
问题 I am trying to set a proxy for a ChromiumWebBrowser() without changing the settings of other browsers. My code looks like this : CEF initialization Here I will initialize CefSharp and call the method that will test to set the proxy public CFTryOut() { var settings = new CefSettings() { CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Cache"), }; CefSharpSettings.ShutdownOnExit = true; Cef.Initialize(settings, performDependencyCheck

CefSharp Support Flash Plugin,But in the load pop-up DOS window

眉间皱痕 提交于 2019-12-11 14:54:47
问题 I User CefSharp code: var setting = new CefSharp.CefSettings(); setting.CefCommandLineArgs["ppapi-flash-path"] = AppDomain.CurrentDomain.BaseDirectory + @"PepperFlash\pepflashplayer.dll"; CefSharp.Cef.Initialize(setting); Run time: I want to know why it appears, how not to let the other pop up CefSharp Version # CefSharp 47.0.0.0 libcef.dll 3.2526.1362.0 回答1: Issue is with the Pepper Flash plugin being run without Sandbox , unfortunately there is no workaround and the upstream issue has been

cefsharp 使用代理切换ip

半城伤御伤魂 提交于 2019-12-11 14:37:18
CefSharp提供WPF和WinForms Web浏览器控件实现,不同于Webbrowser嵌入的是IE,CefSharp在.NET应用程序中嵌入Chromium。 普通的CefSharp使用代理功能代码如下: var settings = new CefSettings(); settings.CachePath = "cache"; settings.CefCommandLineArgs.Add("proxy-server", ProxyAddress); Cef.Initialize(settings); 如果代理需要用户名和密码验证就再加一段以下代码 CefSharp.CefSharpSettings.Proxy = new CefSharp.ProxyOptions(代理ip, 端口, 用户名,密码); 最近在使用CefSharp的代理设置功能时遇到一个问题,使用过程种需要一直换代理ip,但是Cef.Initialize(settings) 只能初始化一次,最开始是想通过每次使用生成一个新的实例的方式来做,但是总感觉不太好。后来查资料找到了以下办法,拿出来跟大家共享: 编写方法: async private void SetProxy(ChromiumWebBrowser cwb, string Address) { await Cef