Skip to content

[Problem/Bug]: Method ICoreWebView2.Print() don't work if using page ranges #4671

Open
@MLAEO02

Description

@MLAEO02

What happened?

In my company we use the Print() method to print documents. The problem arises when we set a page range in the ICoreWebView2PringSettings class that starts with 4 or higher. For example:

  • Range "1": work
  • Range "1-10": work
  • Range "4-10": don't work
  • Range "5": don't work

When we send the print with a "problematic" range, the document is not printed. Furthermore, if we open a new instance of WebView2, it remains gray without showing any sign of life.
From the task management detail, we see a msedgewebview2.exe process that was started with the "--utility-sub-type=network.mojom.PrintService" parameter and which remains active even after starting printing.
As long as it is not killed manually, the WebView2 component is no longer instantiated and, for this reason, subsequent startups remain gray.
Once killed manually, after 2-3 minutes other msedgewebview2.exe processes automatically die. Subsequently, the behavior becomes correct again: the WebView2 component can be instantiated again and allows us to correctly view the documents.

What could be the problem?

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

126.0.2592.87

SDK Version

4.6.01055

Framework

Other

Operating System

Windows 10

OS Version

No response

Repro steps

  1. Set any printer in ICoreWebView2PrintSettings class
  2. Set a range of pages in the ICoreWebView2PrintSettings class: the range must have a starting value equal to or greater than 4
  3. Send the printing of any document via the CoreWebView2 16.Print() method

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Regression in newer Runtime

Last working version (if regression)

Before 126.0.2592.87

AB#52577196

Metadata

Metadata

Labels

bugSomething isn't workingregressionSomething used to work but doesn't anymoretrackedWe are tracking this work internally.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions