How to implementation CefPrintHandler?
In CefSharp.Core.dll ClientAdapter not implementation CefPrintHandler.
CefClient.h not implementation GetPrintHandler method.
https://bitbucket.org/chromiumembedded/cef/src/2782fb8fc85f55b87ea3c8bedaccec243eba65ed/include/cef_client.h?at=2454&fileviewer=file-view-default
@feliciwithme I've replaced your large hard to read code block with a link to the CEF source.
I'm not really sure what your asking?
Implement this interface to handle printing on Linux. The methods of this class will be called on the browser process UI thread.
The CefPrintHandler is only relevant on Linux according to the documentation.
http://magpcss.org/ceforum/apidocs3/projects/%28default%29/CefPrintHandler.html
How Implement this interface to handle printing on windows? I want to implment printing without the popup printsetting dialog, When user click print button to direct print without choice printdialog.
Unfortunately there is no simple solution for that. CEF has limited options.
See http://magpcss.org/ceforum/viewtopic.php?f=6&t=12567#p24126 for official comment from the CEF maintainer.
I think the general workaround is export to PDF, then print that.
@amaitland Thank you very much, I want to give it a shoot.
I am using CEFSharp 42 from Nuget and am struggling to locate the PrintToPDF that I can see here.
PrintToPdf is part of the 45.0.0 release, the relevant PR is #1278
is there an example for winforms?
There is a WPF example, the code isn't particularly WPF specific, so most parts should translate.
https://github.com/cefsharp/CefSharp/blob/cefsharp/45/CefSharp.Wpf.Example/MainWindow.xaml.cs#L110
I just read a thread that stated is was a part of 45 so deleted my post here whilst I tried that -your too fast :)
thank you - example is perfect
Closing this as there is no need to implement CefPrintHandler (Linux only). If anyone has a specific question as followup, please create a new issue.