Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print and print preview is not working in iframe window. #2753

Closed
magreenblatt opened this issue Aug 29, 2019 · 12 comments
Closed

print and print preview is not working in iframe window. #2753

magreenblatt opened this issue Aug 29, 2019 · 12 comments
Labels
bug Bug report Framework Related to framework code or APIs

Comments

@magreenblatt
Copy link
Collaborator

Original report by Anil Achary (Bitbucket: acharyanil, GitHub: acharyanil).


In cefclient (3770 branch+1669c0a commit and in master 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.

Tested on windows 10 OS.

Best Regards,
Anil

@magreenblatt
Copy link
Collaborator Author

Original comment by Anil Achary (Bitbucket: acharyanil, GitHub: acharyanil).


I have tested in Google Chrome version 75.0.3770.100, print is working fine in iframe window.

@magreenblatt
Copy link
Collaborator Author

Original changes by Anil Achary (Bitbucket: acharyanil, GitHub: acharyanil).


  • changed component from "Unclassified" to "Framework"

@magreenblatt
Copy link
Collaborator Author

Original changes by Anil Achary (Bitbucket: acharyanil, GitHub: acharyanil).


  • edited description

1 similar comment
@magreenblatt
Copy link
Collaborator Author

Original changes by Anil Achary (Bitbucket: acharyanil, GitHub: acharyanil).


  • edited description

@magreenblatt
Copy link
Collaborator Author

Original comment by Anil Achary (Bitbucket: acharyanil, GitHub: acharyanil).


I have tested in the latest branch 3865 and in Master branch as well, print does not work in iframe content window.
For testing, Edited DOM element with below line and executed following command in console.

@magreenblatt
Copy link
Collaborator Author

Original changes by Anil Achary (Bitbucket: acharyanil, GitHub: acharyanil).


  • edited description

@magreenblatt
Copy link
Collaborator Author

Original comment by Anil Achary (Bitbucket: acharyanil, GitHub: acharyanil).


I have fixed the issue, will raise a PR after testing.

@magreenblatt
Copy link
Collaborator Author

@magreenblatt
Copy link
Collaborator Author

Fix printing from iframes (fixes issue #2753)

→ <<cset b560f0404603 (bb)>>

@magreenblatt
Copy link
Collaborator Author

  • changed state from "new" to "resolved"

@magreenblatt
Copy link
Collaborator Author

Fix printing from iframes (fixes issue #2753)

→ <<cset 7692d87e04b5 (bb)>>

@magreenblatt
Copy link
Collaborator Author

Original comment by Ilia Shkolyar (Bitbucket: iliashko, GitHub: iliashko).


Hello @{557058:2f2a2aee-b500-4023-9734-037e9897c3ab} ,

Will this fix be ported into the 3865 branch as well?
According to the issue description it happens there as well, and the fixes were committed to branches 3904 and master only.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report Framework Related to framework code or APIs
Projects
None yet
Development

No branches or pull requests

1 participant