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

Open parameter "page" doesn't work with large document #3949

Closed
drxx opened this issue Nov 21, 2013 · 11 comments
Closed

Open parameter "page" doesn't work with large document #3949

drxx opened this issue Nov 21, 2013 · 11 comments
Labels

Comments

@drxx
Copy link

drxx commented Nov 21, 2013

Hello!

I have a document in PDF format with 400 pages. I've called the URL like ...document.pdf#page=214. pdf.js opens the document and shows page 250 instead. The navigation bar still said "214/400". Start scrolling the navigation bar was changed to "250/400".

cu

@Snuffleupagus
Copy link
Collaborator

Please provide at least a link to a PDF file demonstrating the issue. Preferably, you should also provide information regarding your configuration, see: https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#wiki-issue.

@drxx
Copy link
Author

drxx commented Nov 21, 2013

I can't provide a link to this document, it's in an intranet. Sorry. But I found a document with a similar effect:

http://www.nikonusa.com/pdf/manuals/noprint/D7000_ENnoprint.pdf#page=214

If I load this file it jump to the wrong page too.

@sld
Copy link

sld commented Nov 21, 2013

I have similar problem too.
Some Pdfs open not in given page, but somewhere in early page.
It happens with some small pdf documents (5 Mb) too.

@yurydelendik
Copy link
Contributor

If I load this file it jump to the wrong page too.

@drxx physical page 214 or page that marked as 214?

@yurydelendik
Copy link
Contributor

So far works for me, it jumps to the page 214 which is marked as 194 on the "paper".

@drxx
Copy link
Author

drxx commented Nov 21, 2013

My destination in the document is the page number 132. Thats tthe 152th page in the document. The parameter was "page=214". The page number on the page/paper (132) is not relevant, it's just a text.

First time I load the document it shows (with page=214), the head line shows "Page: 214 of 348". When I scroll just a few pixel with my mouse the head line changes to "Page: 152 of 348". So page 152 was shown instead of 214. Afterwards with a new download (not just click on the button "reload") it's the same problem. Pressing just "reload" does not show the problem.

@yurydelendik
Copy link
Contributor

Looks like a dup of https://bugzilla.mozilla.org/show_bug.cgi?id=939753 . I think it's related to how page holders initially set/rotated.

@drxx
Copy link
Author

drxx commented Nov 21, 2013

That's right. It seems to be the same error. Just 3 days old.

@timvandermeij
Copy link
Contributor

@drxx Is this still an issue for you with the latest viewer at http://mozilla.github.io/pdf.js/web/viewer.html? I can't seem to be able to reproduce the problem.

@Snuffleupagus
Copy link
Collaborator

Is this still an issue for you with the latest viewer at http://mozilla.github.io/pdf.js/web/viewer.html? I can't seem to be able to reproduce the problem.

The main issue, as reported, should already be fixed.
(I can't be bothered to look it up right now using git bisect, but if memory serves this might have regressed all the way back in #2719, and I think it was fixed by #3848.)

That said, there is still a slight issue with this in certain circumstances. When opening: http://www.nikonusa.com/pdf/manuals/noprint/D7000_ENnoprint.pdf#page=214, the right page does become visible, but it's slightly scrolled down.
This is how it looks:
wrong

This is how it ideally should look:
right

This only happens in some files though, when the first page has different dimensions or rotation than the rest of the pages in the file. (Since all pages are initialized with the viewport of the first page: https://github.com/mozilla/pdf.js/blob/master/web/viewer.js#L853-L869.)
I don't know if there are any easy ways to fix this, but in my opinion this is a such a minor issue now that I would say that this issue, as reported, is fixed. (The Bugzilla issue linked above works perfectly fine now, btw.)

@timvandermeij
Copy link
Contributor

Closing as fixed. The original issue is fixed; the scroll issue is really minor and can be fixed later on if someone finds that necessary.

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

No branches or pull requests

5 participants