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

Why webview2 print dialoag reset the scale to fit to printable everytime and zoom also reset on navigating to another or page reload #2523

Closed
BKSoftCraft opened this issue Jun 14, 2022 · 18 comments
Assignees
Labels
tracked We are tracking this work internally.

Comments

@BKSoftCraft
Copy link

BKSoftCraft commented Jun 14, 2022

Why webview2 print dialoag reset the scale to fit to printable everytime and zoom also reset on navigating to another page or on reload

  • is this a bug or problem from my side

AB#40884473

@BKSoftCraft BKSoftCraft changed the title Why webview2 print dialoag reset the scale to fit to printable on everytime and zoom also reset in navigating to another or page reload Why webview2 print dialoag reset the scale to fit to printable everytime and zoom also reset on navigating to another or page reload Jun 14, 2022
@monica-ch
Copy link
Contributor

@BKSoftCraft This is by edge browser design. Please validate in browser and let us know if you notice any differences in webview2

@BKSoftCraft
Copy link
Author

what about zoom scale ?, it not reset on edge to 100% on navigation to another page but in webview2 it reset to 100%

@BKSoftCraft
Copy link
Author

other browser have feature to remember last print dialog setting, so i recommended to implement printer dialog setting remeber feature in future to match the other compatitors

@monica-ch
Copy link
Contributor

@BKSoftCraft In WebView2, applied zoom is only for the current page and is reset on a navigation.
We have Zoom Factor API to set the zoom for the WebView.

@BKSoftCraft
Copy link
Author

Thanks, is there any solution for printer window to remeber last settings

@monica-ch
Copy link
Contributor

@BKSoftCraft Edge/WebView2 remembers last used print settings. Are you seeing any issues here? If yes, can you please mention the fields where you are seeing the issue in print dialog.

@BKSoftCraft
Copy link
Author

(In More Settings) Scale(%) in print dialog always set to fit to printable, if i set it to actual size then on next time it reset to fit to printable

@BKSoftCraft
Copy link
Author

Screenshot (29)
Every time it reset to fit to printable area

@monica-ch
Copy link
Contributor

I don't see this behavior with scale(%) in webview2 and edge (tested in two different machines against stable and canary channels)

@BKSoftCraft
Copy link
Author

i tested in edge browser and my webview app it always reset to fit to printable are

dummy.pdf.-.Profile.1.-.Microsoft.Edge.2022-06-21.12-25-25.mp4

@BKSoftCraft
Copy link
Author

Did you see the issue, is there any fixes for this

@monica-ch monica-ch reopened this Jun 21, 2022
@monica-ch
Copy link
Contributor

@BKSoftCraft Observing the behavior with PDF files, I'll look into it and get back to you.

@BKSoftCraft
Copy link
Author

is there any solution available now regarding this issue

@nishitha-burman nishitha-burman added the tracked We are tracking this work internally. label Aug 11, 2022
@monica-ch
Copy link
Contributor

monica-ch commented Aug 29, 2022

@BKSoftCraft Per WebView2 and Edge browser design, for HTML documents, after selecting an initial scale percentage, the next time print preview dialog is triggered, the selection defaults to 'Actual Size'. For PDF documents, the next time print preview dialog is triggered, the selection defaults to 'Fit to Printable Area'.

However, there is a bug where scaling percentage is lost and doesn't stick on the UI for pdf documents which is fixed recently.

For both the HTML/PDF printing, the last used percentage is now made sticky, and the printing happens as per the default scenario selected on every instance.

You can test this fix against runtime 106.0.1363.0+

@cronwerk
Copy link

cronwerk commented Aug 30, 2022

Will it be possible to set the default print-scale to 100%? To not choose every time?

@monica-ch
Copy link
Contributor

@cronwerk We are currently working on an API for the apps to customize the Print dialog and is being tracked #1331

@BKSoftCraft
Copy link
Author

On Microsoft Edge Beta Version 106.0.1370.26 scale percentage is sticky but what about scale option (e.g Fit to printable area , Actual size, and customer percentage), Option always reset to Fit to printable area every time. Why ?

@monica-ch
Copy link
Contributor

@BKSoftCraft This is by design. For HTML documents, it defaults to 'Actual Size'. For PDF documents, the selection defaults to 'Fit to Printable Area'. Please open a feature request with us if you want a different behavior in WebView2.

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

No branches or pull requests

4 participants