Bug 449492 - Trim margins: When navigating, document acts as if the margins are still present
Summary: Trim margins: When navigating, document acts as if the margins are still present
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-02 11:29 UTC by rgreen
Modified: 2022-02-09 14:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
PDF showing issue with trimmed margins (70.27 KB, application/pdf)
2022-02-02 11:29 UTC, rgreen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rgreen 2022-02-02 11:29:07 UTC
Created attachment 146168 [details]
PDF showing issue with trimmed margins

SUMMARY
***
Even when "Trim margins" is selected, the document still behaves, for navigation purposes, as if the margins were still preent. This means that if the user reduces the width of the program window to just encompass the trimmed pages s/he will not be able to navigate between pages using the keyboard Left/Right arrows.

SUGGESTION: When "Trim view" is selected allow the user to reduce the width of the window further to barely more than the width of the trimmed document AND still maintain the functionality of the left/right keyboard arrows. 

***

STEPS TO REPRODUCE
1. Open the attached document at 100% view.
2. Reduce the width of the window to the minimum possible without the horizontal scroll bar appearing.

EXPECTED / OBSERVED result: You can use the keyboard left / right arrows to navigate between pages.

3. Select View > Trim view > Trim margins.
4. Reduce the width of the window further.

EXPECTED RESULT: You should be able to reduce the width to barely more than that of the trimmed view without the scroll bars appearing.
OBSERVED RESULT: A scroll bar appears well before you reach the limit of the trimmed pages. In other words, the document is behaving as if the margins are still present.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux Mint 20.1
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.3
Comment 1 Szymon Rutkowski 2022-02-08 15:33:34 UTC
Hello, thanks for reporting. On my end I can kind of reproduce the effect you're seeing, but this is because the trimmed pages are actually of different width each. The 6th and 8th page (possibly all the even ones?) seem to be the widest. If I adjust the width to the widest page, the problem doesn't appear. Can you confirm this isn't the case on your end?

For reference, I'm on Plasma version 5.22.5, framework 5.85.0, Qt 5.15.2.
Comment 2 rgreen 2022-02-08 18:08:07 UTC
After further investigation the issue seems to be a little more involved:

1. Open the pdf document and set to page 1.
2. Trim margins and reduce the width of the window slightly, so that a scroll bar appears (even though it shouldn't since there should still be plenty of space around the trimmed sides.
3. Close the pdf doc. and reopen.
4. Now use the mouse wheel to scroll down through the pages.

RESULT: The horizontal scroll bar disappears at page 9! Now the document width can be reduced to the trim margins.

5. Close and reopen the program.

RESULT: The horizontal scroll bar appears again!
Comment 3 Szymon Rutkowski 2022-02-09 14:11:26 UTC
Alright. This indeed looks like it might be something more involved but different. Please create a separate bug ticket for convenience of the maintainers (and also fill the Okular version in the form if you do). Optionally you could investigate if something like this can happen in similar circumstances in other KDE suite/Qt programs.