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

[PDFViewer] Pager not in sync when scrolling a document with different paper orientation and becomes empty when last page is reached #4267

Open
mbechev opened this issue Apr 3, 2024 · 0 comments

Comments

@mbechev
Copy link
Contributor

mbechev commented Apr 3, 2024

Describe the bug
The built-in pager cannot properly calculate and scroll to the correct page when the uploaded PDF file has pages with different orientations (landscape and portrait). The pager correctly determines the pages until the page with changed orientation is reached.

In addition, when the incorrect pager calculation indicates that the last page of the document is reached, the pager becomes empty.

To Reproduce
Upload the following file:
paging-issue.pdf

and start scrolling the PDFViewer pages. See that after page 7 the pager starts to incorrectly count the next/previous pages and after page 25 (which is incorrectly calculated to be the last page), the pager becomes empty.
https://stackblitz.com/edit/angular-jgecpe?file=src%2Fapp%2Fapp.component.ts

The issue with the empty pager can also be reproduced when uploading the following file and scrolling to the end of the document:
Sample-test-file.pdf

@zstoyanova9 zstoyanova9 changed the title [PDFViewer] Pager not in sync when scrolling a document with different paper orientation [PDFViewer] Pager not in sync when scrolling a document with different paper orientation and becomes empty when last page is reached Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant