Jumping pages/following links changes horizontal position
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qpdfview |
Fix Released
|
Low
|
Adam Reichold |
Bug Description
Here is my scenario:
I open a PDF with pretty wide left/right page margins (LaTeX generated). So i zoom the page that the margins are not visible. Horizontal scrolling is set up to center the page. Two things now cause a bad usability:
1. Changing the page number either via the prev/next buttons or by entering a page number directly resets the horizontal scroll position to 0. Thus showing me the left page margin and the left part of the body text, forcing me to adjust horizontal scroll position again.
2. Clicking a link that points to a position within the PDF seems to try to center the linked position. Thus for example, clicking a link to an equation, which has the anchor quite on the right side of the body text, shows me the right margin and the right part of the body text.
Suggestion: Do not change horizontal scroll position when changing pages. When following links only change horizontal scroll position if the anchor is not visible without changing it.
Issues: What about documents which are not usual top->bottom text? Does page orientation matter?
Related branches
Changed in qpdfview: | |
status: | Fix Committed → Fix Released |
Hello Thomas,
thanks for taking the time to report this. I created the linked branch which tries to keep the page-relative positions when just jumping to a new page a no explicit new page-relative position is given. Could you build it from the sources and give it a try?
Jumping to a link does not center the link position, but rather some links (within PDF documents at least) contain explicit set-left- of-viewport and/or set-top-of-viewport information which we try to follow as best as we can w.r.t. the current view mode. So if your link to an equation moves the equation itself out of the viewport, then these hints maybe wrong. Could you provide an example file where this happens?
Best regards, Adam.
P.S.: Have you tried the "Trim margins" setting available in newer versions which will try to automatically remove empty margins so that one can for example use fit-to-width view modes more comfortably.