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

PrintAsync Function Bug #3379

Closed
clayzzzzzzzzzz opened this issue Apr 11, 2023 · 15 comments
Closed

PrintAsync Function Bug #3379

clayzzzzzzzzzz opened this issue Apr 11, 2023 · 15 comments
Assignees
Labels
bug Something isn't working tracked We are tracking this work internally.

Comments

@clayzzzzzzzzzz
Copy link

clayzzzzzzzzzz commented Apr 11, 2023

Description
If the printer name contains Chinese or full width spaces, the PrintAsync function will fail.
Here is my code:
CoreWebView2PrintSettings printSettings = webView.CoreWebView2.Environment.CreatePrintSettings();
printSettings.PrinterName = "HP LaserJet 400 M401 PCL6 Class Driver(副本1)";
CoreWebView2PrintStatus printStatus = await webView.CoreWebView2.PrintAsync(printSettings);
printStatus will be OtherError.

Version
SDK: Microsoft.Web.WebView2 v1.0.1722.32
Runtime: C# .NET Framework 4.6.1
Framework: WinForms
OS: Win10

AB#44135146

@clayzzzzzzzzzz clayzzzzzzzzzz added the bug Something isn't working label Apr 11, 2023
@novac42
Copy link
Contributor

novac42 commented Apr 11, 2023

Thanks for reporting the issue. I've assigned this to a dev that can help follow up on this.

@monica-ch monica-ch added the tracked We are tracking this work internally. label Apr 11, 2023
@monica-ch
Copy link
Contributor

@clayzzzzzzzzzz Is printing to the same printer HP LaserJet 400 M401 PCL6 Class Driver(副本1) succeeded from browser print dialog?

@clayzzzzzzzzzz
Copy link
Author

rinting to the same

Thanks

@clayzzzzzzzzzz
Copy link
Author

@clayzzzzzzzzzz Is printing to the same printer HP LaserJet 400 M401 PCL6 Class Driver(副本1) succeeded from browser print dialog?

Yes!
When i rename this printer to ”HP LaserJet 400 M401 PCL6 Class Driver()“ and “HP LaserJet 400 M401 PCL6 Class Driver”,webview2(v1.0.1722.32) will always print successfully.

@monica-ch
Copy link
Contributor

@clayzzzzzzzzzz Looks like issued is resolved. Closing the issue, feel free to reopen if you have any questions.

@clayzzzzzzzzzz
Copy link
Author

resolved. Closing the issue, feel free to reopen if you have any question

Thanks

@clayzzzzzzzzzz
Copy link
Author

issued is resolved. Closing the issue, feel free to reopen i

Hi, this issue still exists in version 1.0.1774.30.

Version
SDK: Microsoft.Web.WebView2 v1.0.1774.30
Runtime: C# .NET Framework 4.6.1
Framework: WinForms
OS: Win10

@novac42
Copy link
Contributor

novac42 commented May 29, 2023

Hi @monica-ch customer reports the issue still exists in version 1.0.1774.30, so I reopened the issue. May you take another look?

@monica-ch
Copy link
Contributor

@clayzzzzzzzzzz Sorry you are seeing the issue again. May I know the WV2 runtime version installed on your machine?

Also, I believe printer name is either of HP LaserJet 400 M401 PCL6 Class Driver()/HP LaserJet 400 M401 PCL6 Class Driver right?

@clayzzzzzzzzzz
Copy link
Author

@clayzzzzzzzzzz Sorry you are seeing the issue again. May I know the WV2 runtime version installed on your machine?

Also, I believe printer name is either of HP LaserJet 400 M401 PCL6 Class Driver()/HP LaserJet 400 M401 PCL6 Class Driver right?

@monica-ch The WebView2 Runtime version is 114.0.1823.43
If the printer name is LaserJet 400 M401 PCL6 Class Driver() or HP LaserJet 400 M401 PCL6 Class Driver, it will print correctly. If the printer name contains Chinese, it will fail to print.
In addition, Some users name the printer based on its location, so there is a high possibility that printers may include Chinese characters in China.

@monica-ch
Copy link
Contributor

@clayzzzzzzzzzz Yes able to repro it locally if printer name has Chinese characters. We are actively working on the fix and update the thread once we fix is in. Thanks!

@monica-ch
Copy link
Contributor

@clayzzzzzzzzzz This should be fixed in runtimes 116.0.1932.0+. Thanks!

@clayzzzzzzzzzz
Copy link
Author

@clayzzzzzzzzzz This should be fixed in runtimes 116.0.1932.0+. Thanks!
Hi, @monica-ch.

I would like to know how to upgrade webview2 runtime, I upgraded webview2 from 1.0.1774.30 to 1.0.1905-prerelease in Nuget, but the runtime was still 114.0.1823.43.

@monica-ch
Copy link
Contributor

@clayzzzzzzzzzz You can use Edge canary channel for testing as the fix is not in the stable runtime yet. Please refer Testing upcoming APIs doc for more info.

@clayzzzzzzzzzz
Copy link
Author

@monica-ch Thank you for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

3 participants