Feature Request - quick print and print preview
CEF has yet to implement print preview, there is an open PR you can track the progress there https://bitbucket.org/chromiumembedded/cef/pull-requests/126
There is no quick print functional as part of the CEF API.
Thank you. I just wanted to implement such a function: brower.print ('printName', pageNumber) , and do not display the print dialog.
Print Preview
support has been added in CEF
with commit https://bitbucket.org/chromiumembedded/cef/commits/1669c0afbd121be45c41126ef5d09f44768e0e0a
Pass the
--enable-print-preview
command-line flag to enable.
I don't see any CEF API
changes, so it looks like it's either enabled or disabled via a command line arg.
Should be included in version 77
master
has been upgraded to CEF 77.1.3+gf0a1c44+chromium-77.0.3865.90
I've added CefSettings.EnablePrintPreview
to make appending the command line arg easier.
https://bitbucket.org/chromiumembedded/cef/issues/2867/save-as-pdf-is-not-working-in-pdf-viewer suggests that saving a pdf when print preview is enabled is not working.
Print preview only appears to be working in WinForms
, in WPF
the print dialog is displayed instead of the print preview.
Testing with cef_binary_79.1.35+gfebbb4a+chromium-79.0.3945.130_windows32_client using the following command line args and I can reproduce the problem, so appears to be a bug in CEF
.
cefclient --multi-threaded-message-loop --off-screen-rendering-enabled --enable-gpu --enable-print-preview
I've commented https://bitbucket.org/chromiumembedded/cef/issues/123/add-support-for-print-preview#comment-55944942 and will see what response I get.
Print preview is only available in WinForms
see https://bitbucket.org/chromiumembedded/cef/issues/123/add-support-for-print-preview#comment-55952406 for official response from CEF maintainer
.
Most helpful comment
master
has been upgraded toCEF 77.1.3+gf0a1c44+chromium-77.0.3865.90
I've added
CefSettings.EnablePrintPreview
to make appending the command line arg easier.