MicrosoftEdge / MicrosoftEdge/WebView2Feedback

When open pdf file in WebView2, the get_ZoomFactor return wrong value

Open
#1,954 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Description

I have a windows program that is based on https://docs.microsoft.com/en-us/microsoft-edge/webview2/get-started/win32.
I open a pdf file in WebView2, the pdf's page width is bigger than WebView2 area's width,
then using "get_ZoomFactor" to get zoom factor, it return 1.0, but actually the zoom factor is less than 1.0 (Ex: 0.78 ).

Repro Steps

  1. Use WebView2 open pdf file (the pdf's page width is bigger than WebView2 area's width)
  2. Use "get_ZoomFactor" to get the zoom factor, it return 1.0 (but actually the zoom factor is 0.78 )
  3. Zoom in the pdf file by click "+" button in tool bar.
  4. Use "get_ZoomFactor" to get the zoom factor, it can return the right value 0.8

AB#37149247

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WebView2 Win32 getting-started setup and reproduce the reported PDF scenario: open a page wider than the WebView2 area, then compare get_ZoomFactor before and after clicking the PDF toolbar's "+" button. Confirm whether the initial fit-to-width value is reported correctly and review the linked AB#37149247 work item for related tracking.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.