MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Open PDF file with open parameter(#view=Fit) doesn't work the first time

Open
#2,464 6 comments 1 reaction 1 assignee View on GitHub

@vickiez is already working on this.

Since May 17, 2022.

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

Description

Description
When using WebView2 to open PDF file, it only supports to set fit width and set fit both in toolbar.

But in our project,
we need to support to set fit height, and we uses the opening paramter "#view=FitV" to implement it.
However, "#view=FitV" doesn't work the first time.

Repro Steps

  1. Open a PDF file(e.g. 1.pdf) in WebView2
  2. Reopen 1.pdf with #view=FitV, after this step, the setting fit height doesn't work.
  3. Reopen 1.pdf with #view=FitV again, after this step, the setting fit height works.

But if we open another PDF with #view=FitV, it works.

  1. Open a PDF file(e.g. 1.pdf) in WebView2
  2. Open another PDF file(e.g. 2.pdf) with #view=FitV, after this step, the setting fit height works.

Why reopen the PDF file with #view=FitV first time, it doesn't work?

AB#39611010

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.