-
Notifications
You must be signed in to change notification settings - Fork 51
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
[Feature]: Silent pdf printing from WebView2 #4422
Comments
@monica-ch is this possible? |
@b-mi Could you verify if the PrintToPdfAsync works when the WebView2 control is made visible for rendering, but not actually included in the application's user interface hierarchy? The idea is to make the WebView2 control visible, triggering it to render its content for printing, even though it's not placed in the user interface and therefore not visible to the user. This approach would allow the application to print the rendered content without the need to display the WebView2 control to the user. |
Yes, it looks like in WebView2 version 1.0.2535.41 it is possible to simulate direct printing in a WPF application. This code works for me:
|
Closing as the issue has been resolved. Please reopen if you have further questions. Thanks! |
Describe the feature/enhancement you need
There is support for silent printing of the current web page. So there is support for silent printing of DISPLAYED content.
But we need ability to print pdf file silently through WebView2 without displaying WebView2 control and pdf file in it.
It is about printing via webview2 without displaying webview2.
The scenario/use case where you would use this feature
We have ERP system with many created pdf files. Users ask direct print of pdf without displaying pdf file. Users does not want always to display PDF content before printing. Thank you.
How important is this request to you?
Impactful. My app's user experience would be significantly compromised without it.
Suggested implementation
No response
What does your app do? Is there a pending deadline for this request?
No response
AB#50160785
The text was updated successfully, but these errors were encountered: