Skip to content

Page shift on zooming #1127

@bitforcesrl

Description

@bitforcesrl
Bug Report or Feature Request (mark with an x)
- [x] Regression (a behavior that used to work and stopped working in a new release)
- [ ] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request

The issue is present in the latest version of the library, 10.2.2. The first version where the issue is not present is 10.0.0.
OS: Mac OS 14.3.1 (23D60)
Browser: Chrome, Firefox and Safari

Problem Description: When zooming (in or out) on the document, something strange happens.
If you look closely, you can see that the document shifts to the left, and at times, a horizontal scrollbar appears.
When you scroll the document, the PDF is centered back, and everything works as expected.
The problem is more evident when zooming out.

The described issue is also present on the demo page: https://vadimdez.github.io/ng2-pdf-viewer/

In the following image, the PDF is aligned to the left after zooming out. Scrolling the page restores the PDF to the center.

Screenshot 2024-08-28 at 17 57 49

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions