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

[Feature]: Add printer tray support to CoreWebView2PrintSettings #4368

Open
Hedwig188 opened this issue Feb 9, 2024 · 2 comments
Open

[Feature]: Add printer tray support to CoreWebView2PrintSettings #4368

Hedwig188 opened this issue Feb 9, 2024 · 2 comments
Labels
feature request feature request

Comments

@Hedwig188
Copy link

Describe the feature/enhancement you need

It would be nice if we can specify a printer tray on CoreWebView2PrintSettings. It would be more ideal than passing the custom PageHeight and PageWidth and doing the conversion for all pageSize to inches.

The scenario/use case where you would use this feature

In our application, end user can specify a printer tray in our custom print dialog, we want to pass the printer tray info directly to WebView2.PrintAsync API. Currently since printer tray is not supported, we require end user to specify a paper size and we convert it to the inches to pass down to WebView2.PrintAsync API.

How important is this request to you?

Nice to have. There are other ways to tackle this, but having official API support would be beneficial.

Suggested implementation

No response

What does your app do? Is there a pending deadline for this request?

See the scenario/use case section above.

@Hedwig188 Hedwig188 added the feature request feature request label Feb 9, 2024
@victorhuangwq
Copy link
Collaborator

Hi @Hedwig188 as of now I don't think the browser print dialog supports selecting a printer tray? (You would have to use the system dialog to do that I think). Let me know otherwise, however.

If this is something that the browser doesn't currently support, it will be very unlikely that we will support it.

@ajtruckle
Copy link

ajtruckle commented Feb 29, 2024

@victorhuangwq I don't understand why we have to enter paper sizes in inches. They are bespoke dimensions. Why is there not an enumeration for paper sizes that allows us to simply use a constant? Eg: page_size_a4? WebView2 could still support passing dimensions for custom sizes. and even then could have a parameter to indicate if we are passing in mm or inches because WebView2 could do the calc under the hood. Make it a little easier for us to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request feature request
Projects
None yet
Development

No branches or pull requests

3 participants