Printing content of any iframe window and not just main frame window
Issue #3303
invalid
The current printing functions, Print() and PrintToPDF() are provided at the browser host level and are always applied to the main frame. In Javascript however one can invoke window.print()
and also iframe.contentWindow.print()
(requires focus()
first but generally works). Unless I am missing something the current CEF implementation assumes printing is always on the main frame and currently there is no way to:
- Distinguish between the two cases when receiving print related notifications .e.g in OSR when using a print handler
- Invoke printing on a frame other than the main frame
Is this correct or am I missing something?
Comments (4)
-
-
reporter I indeed do window.print() on the desired frame but CEF in OSR still prints the main frame when implementing the print handler.
-
reporter Sorry, looks like it is my mistake, the OnPrintJob() handler receives a PDF with the correct content.
-
reporter - changed status to invalid
- Log in to comment
What is the use case for this?
You can use ExecuteJavaScript to call window.print() on the desired frame.