Add support for print preview in CEF (issue #123)
Zhengzhou Zhang
Branch: ivdone/cef_master:master
Branch: chromiumembedded/cef:master
Declined
Declined pull request
Manually merged in master revision 1669c0a with the changes listed above.
Closed by: Marshall Greenblatt·2019-07-20
Hi folks,
I have implemented the chromium print preview dialog in CEF. Here are some reasoning of my changes and I hope they can help you walk through the code.
CefPrintViewManager will not handle the print now. It handles the "PrintToPdf" function we exposed through browserHost. Also, it listen to two print preview message PrintHostMsg_RequestPrintPreview, PrintHostMsg_ShowScriptedPrintPreview and generate the browserInfo for print preview dialog
The 'path' related patch are used for enable the download manager. Which will be used by 'print to pdf' in print preview.
enable_service_discovery will need to be disabled if using print preview because it does not work now in CEF.
Please let me know if there is anything . Thanks!