print and print preview is not working in iframe window.
Posted: Wed Aug 28, 2019 1:05 pm
Hi,
In cefclient (3770 branch), print and print preview is not working in iframe content window.
I have included below iframe in the cefclient
<div class="ctr-p" id="viewport"><div id="doc-info"></div>
<iframe src="https://www.google.com" id="testprint"></iframe>
and executed below command in console.
document.getElementById('testprint').contentWindow.document.execCommand('print');
Print dialog does not appear.
Rest of the print (windows.print()) works fine, only problem is in the iframe window.
From the analysis, I have found that CEF is not receiving PrintHostMsg_ShowScriptedPrintPreview (CefPrintViewManager::OnShowScriptedPrintPreview) IPC message when the print is executed in the iframe window.
Best Regards,
Anil
In cefclient (3770 branch), print and print preview is not working in iframe content window.
I have included below iframe in the cefclient
<div class="ctr-p" id="viewport"><div id="doc-info"></div>
<iframe src="https://www.google.com" id="testprint"></iframe>
and executed below command in console.
document.getElementById('testprint').contentWindow.document.execCommand('print');
Print dialog does not appear.
Rest of the print (windows.print()) works fine, only problem is in the iframe window.
From the analysis, I have found that CEF is not receiving PrintHostMsg_ShowScriptedPrintPreview (CefPrintViewManager::OnShowScriptedPrintPreview) IPC message when the print is executed in the iframe window.
Best Regards,
Anil