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

Not jumping to page number in URL which is suffixed with #page=<pagenum> #16625

Closed
btwillca5 opened this issue Jun 30, 2023 · 0 comments · Fixed by #16630
Closed

Not jumping to page number in URL which is suffixed with #page=<pagenum> #16625

btwillca5 opened this issue Jun 30, 2023 · 0 comments · Fixed by #16630

Comments

@btwillca5
Copy link

Attach (recommended) or Link to PDF file here:
https://researchtorevenue.files.wordpress.com/2015/04/1r41ai10801601_fong.pdf#page=20

Configuration:
Microsoft Edge 114.0.1823.58 (Official build) (64-bit)
Windows 10 Enterprise 19044.3086 21H2
PDF.js 3.7.108
It is a browser extension

Steps to reproduce the problem:

  1. Click hyperlink to pdf file which includes #page= at the end of URL
  2. https://researchtorevenue.files.wordpress.com/2015/04/1r41ai10801601_fong.pdf#page=20
  3. It does not respect the page number to jump to. If you refresh after loading it will then go to the page.

What is the expected behavior?
Previous version of PDF.js went directly to the page number based on the suffix added to the URL #page=

What went wrong?
It did not go to the page number from the URL

Thanks for providing an excellent PDF viewer!

@Rob--W Rob--W self-assigned this Jul 2, 2023
Rob--W added a commit to Rob--W/pdf.js that referenced this issue Jul 2, 2023
Semantically, it is more correct to encode the fragment in the URL
instead of the URL-encoded `file` query parameter. This shouldn't matter
in practice, because `rewriteUrlClosure` in `chromecom.js` decodes the
`file` parameter and restores the fragment. However, as mozilla#16625 shows,
there was a case where this did not work as expected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants