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

Horizontal scrollbar visible initially #1118

Open
Ben555555 opened this issue Jul 29, 2024 · 3 comments
Open

Horizontal scrollbar visible initially #1118

Ben555555 opened this issue Jul 29, 2024 · 3 comments

Comments

@Ben555555
Copy link

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

When using the following settings:

.pdf-viewer {
    width:100%;
    height:100%;
}

<pdf-viewer class="pdf-viewer" [src]="data.options!.pdfSrc" [original-size]="false" [render-text]='false'
    [show-all]="true" [fit-to-page]="true" [zoom]="zoom"></pdf-viewer>

There is a horizontal scrollbar.

Only workaround I found is to change the zoom from 1 to 0.9 (or another value) and back to 1 like this:

  ngAfterViewInit()	{
    setTimeout(() => {
      this.zoom = 0.999;

      setTimeout(() => {
        this.zoom = 1;
      }, 100);
    }, 100);
  }
@VadimDez
Copy link
Owner

Can you confirm it is the same behavior in version 10.3.1?
Could you also try and see if you get the same on https://vadimdez.github.io/ng2-pdf-viewer/ ?

@madieukhang
Copy link

Hi @VadimDez
Im using the newest version 10.3.0 and got width more than container with open pdf with modal if i press - then + it will get width normally I'm using pdf on your webiste not that got problem but my site got width more than container
image

Can you help me
Thanks

@DaSchTour
Copy link

Can you confirm it is the same behavior in version 10.3.1? Could you also try and see if you get the same on https://vadimdez.github.io/ng2-pdf-viewer/ ?

I can also see the same issue on the demo page. There is a horizontal scroll bar from the start.
I tried to work with an initial zoom at 0.99 but that lead to some very strange display issues when trying to zoom. The document is not centered anymore and ist displayed two times.

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

No branches or pull requests

4 participants