Bug 497715 - "Continuous view" and "Show scrollbars" settings not correctly applied on startup
Summary: "Continuous view" and "Show scrollbars" settings not correctly applied on sta...
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 24.12.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 497358 497900 500020 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-12-20 12:05 UTC by Will
Modified: 2025-03-26 22:53 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Document demonstrating bug 497715, out of copyright vehicle workshop manual section (252.31 KB, application/pdf)
2024-12-20 12:45 UTC, Will
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Will 2024-12-20 12:05:29 UTC
SUMMARY
The "Open in continuous mode by default" option and the "Show scrollbars" option are no longer correctly applied on startup.

STEPS TO REPRODUCE
1. In Okular settings -> General -> Appearance, check "Show scrollbars".
2. Scroll down to the "Program features" section and check "Open in continuous mode by default".
3. Close Okular
4. Open a PDF that hasn't been opened before

OBSERVED RESULT
The scrollbar is not visible, and continuous mode is not active despite "View mode" (in the main toolbar) -> "Continuous" being checked.

EXPECTED RESULT
The scrollbar should be visible, and continuous mode active as well as "View mode" -> "Continuous" being checked.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux kernel 6.12.4
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION
This seems to be a regression in Okular 24.12.0 - I seem to remember this working last week, but I'm not 100% sure.
Comment 1 Will 2024-12-20 12:09:30 UTC
Oh, a slight amendment - for the "OBSERVED RESULT" section, "View mode" -> "Continuous" is NOT checked. The problem goes away if I check this, but doing that for every PDF is frustrating. This also doesn't seem to happen for all documents. I can upload an example if you want. It also seems to correspond to a small "Welcome" box appearing in the top left of the view but again I'm not sure if this is 100% of the time.
Comment 2 Albert Astals Cid 2024-12-20 12:30:48 UTC
This is probably use obeying what the document says should be its opening mode.

Yes upload a document please.
Comment 3 Will 2024-12-20 12:45:07 UTC
Created attachment 176788 [details]
Document demonstrating bug 497715, out of copyright vehicle workshop manual section

Ack, here you go Albert.
Comment 4 Bug Janitor Service 2025-01-04 03:47:34 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Valdas 2025-01-04 10:07:45 UTC
This bug only affects PDF documents opened in Okular for the first time (not previously opened with Okular): even if the "Open in continuous mode by default" option is checked, a  new document opens in non-continuous mode.
Comment 6 Andrea Ippolito 2025-01-14 12:51:13 UTC
Same here about the "Continuous" setting, on Okular 24.12.1 (haven't tried the scrollbars one).

This is happening with some O'Reilly ebooks I cannot unfortunately share here for obvious copyright reasons.

FWIW I tried creating a 2-page PDF from Libreoffice Writer, and the "Continuous" setting was honored for that one though.

It's a hard question to answer IMO whether what the document specified should be honored or not.

I guess there are pros and cons to both ways of doing this (I could see the value of this for a ppt converted to pdf, for example, but I totally hate this for PDFs containing user manuals or books)
Comment 7 Tristan Miller 2025-01-20 17:57:15 UTC
Probably a duplicate of Bug 497900, except that this bug is about both "Continuous view" and "Show scrollbars" whereas the latter mentions only "Continuous view".
Comment 8 Syize 2025-01-26 09:52:34 UTC
*** Bug 497900 has been marked as a duplicate of this bug. ***
Comment 9 Katharta 2025-02-03 21:50:39 UTC
Could a possible compromise perhaps be for Okular to provide an option to force continuous mode on or off, overriding built-in PDF settings permanently? Personally, I do not particularly care how the document thinks it should be opened, I will never ever want to view it in continuous mode. I would imagine there are others who feel the same way for the opposite, as well.
Comment 10 Albert Astals Cid 2025-02-03 22:02:48 UTC
Yes, that is the solution, someone just needs to code it.
Comment 11 John Veness 2025-02-13 22:10:37 UTC
To be honest, I think(In reply to Katharta from comment #9)
> Could a possible compromise perhaps be for Okular to provide an option to
> force continuous mode on or off, overriding built-in PDF settings
> permanently?

To be honest, that is how I would expect the existing "Open in continuous mode by default" setting to work. I'm not sure why it would need a separate setting.
Comment 12 Andrea Ippolito 2025-02-14 06:50:08 UTC
(In reply to John Veness from comment #11)
> To be honest, I think(In reply to Katharta from comment #9)
> > Could a possible compromise perhaps be for Okular to provide an option to
> > force continuous mode on or off, overriding built-in PDF settings
> > permanently?
> 
> To be honest, that is how I would expect the existing "Open in continuous
> mode by default" setting to work. I'm not sure why it would need a separate
> setting.

My understanding is that Okular tries to respect the preference embedded in the PDF, and default technically does mean "in absence of something else" (or "further instructions on how to render", in this case). If the PDF file provides a preference, it makes sense that the default behavior doesn't trigger.

IMO it's quite subtle and honestly I'd be fine with always ignoring whatever the file says, since I know how I want my PDFs displayed.

But to make everyone happy, I think the solution could be to just add another value to the list of options (mind you, not an override flag).

The feature could then be called something like: View mode, with values "continuous", "single page", ..., "specified by document"

"Specified by document" could be the preset value, and behind the scenes it could fallback to whatever mode is currently the preset in Okular, if the PDF you opened doesn't express a preference.

This way users who don't have a strong feeling about the view mode would just get what the PDF file says, and fallback to whatever the current preset is today.

Users who feel strongly about this could just set the view mode they prefer, and it'll always apply, no matter what.
Comment 13 Will 2025-02-14 06:58:33 UTC
(In reply to Andrea Ippolito from comment #12)
> But to make everyone happy, I think the solution could be to just add
> another value to the list of options (mind you, not an override flag).
> 
> The feature could then be called something like: View mode, with values
> "continuous", "single page", ..., "specified by document"
> 
> "Specified by document" could be the preset value, and behind the scenes it
> could fallback to whatever mode is currently the preset in Okular, if the
> PDF you opened doesn't express a preference.
> 
> This way users who don't have a strong feeling about the view mode would
> just get what the PDF file says, and fallback to whatever the current preset
> is today.
> 
> Users who feel strongly about this could just set the view mode they prefer,
> and it'll always apply, no matter what.

+1 for this idea, it would work perfectly for me. As an aside, it's also vaguely similar to what the GNOME PDF viewer thing does (I forget the name, sorry) where it has a "remember current settings as default" button and will then ignore what the document specifies.
Comment 14 John Kizer 2025-02-27 05:36:27 UTC
*** Bug 500020 has been marked as a duplicate of this bug. ***
Comment 15 Albert Astals Cid 2025-03-24 21:10:46 UTC
*** Bug 497358 has been marked as a duplicate of this bug. ***
Comment 16 Bug Janitor Service 2025-03-24 21:59:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/1152
Comment 17 Albert Astals Cid 2025-03-26 22:51:11 UTC
Git commit a30b70665bd8ec612ea8ceac9857e6a469288f40 by Albert Astals Cid.
Committed on 26/03/2025 at 22:50.
Pushed by aacid into branch 'master'.

Add option for obeying file info regarding continuous mode

And default to false since lots of people have complained

M  +3    -0    conf/okular_core.kcfg
M  +4    -2    core/document.cpp
M  +16   -1    part/dlggeneral.cpp

https://invent.kde.org/graphics/okular/-/commit/a30b70665bd8ec612ea8ceac9857e6a469288f40
Comment 18 Albert Astals Cid 2025-03-26 22:53:10 UTC
Git commit e4a46b4a1b4c830fb0678ac210c773dbdfa9ee8a by Albert Astals Cid.
Committed on 26/03/2025 at 22:51.
Pushed by aacid into branch 'release/25.04'.

Add option for obeying file info regarding continuous mode

And default to false since lots of people have complained
(cherry picked from commit a30b70665bd8ec612ea8ceac9857e6a469288f40)

M  +3    -0    conf/okular_core.kcfg
M  +4    -2    core/document.cpp
M  +16   -1    part/dlggeneral.cpp

https://invent.kde.org/graphics/okular/-/commit/e4a46b4a1b4c830fb0678ac210c773dbdfa9ee8a