johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
5.93k stars 273 forks source link

can't enforce single page pagination since 3.0 update #1147

Open solomspd opened 9 months ago

solomspd commented 9 months ago

Question: Since 3.0, I can't enforce single page pagination, there does not seem to be that kind of setting exposed in the menu nor does there seem to be any way of passing that setting.

I wanted to ask if this is intended behavior and if so this setting would be something I'd like to contribute.

Note, when setting the maximum number of columns to 1, it still always shows two pages sides by side when reading .cbz. files that are mostly images (manga). For that matter, changing the number of columns does not affect the number of pages displayed

Version:

johnfactotum commented 9 months ago

Currently it isn't possible unless you convert it to EPUB and set the rendition:spread property. If the property isn't set or is auto, it's treated as landscape, and it will render synthetic spreads if the viewport width is greater than the height.

To fix this there would probably need to be per-book settings. And the natural way to do that would be to save dir (#745) and rendition in the book data (these keys are the ones currently used in foliate-js; however it might be better to save them as readingProgression and presentation to match webpub).

Alternatively/additionally, it could save a set of default rendition settings globally. But maybe it would be okay to make it always default to default/auto.

solomspd commented 9 months ago

thank you! I'm going through the source code. Am I reading it correctly that I should start looking starting ./src/foliate-js/comic-book.js. Are there any other relevant files?

johnfactotum commented 9 months ago

No, comic-book.js is only relevant if you want to add support for CBZs that contain metadata on whether synthetic spreads should be used.

If one wishes to make it configurable then it needs to be implemented in src/book-viewer.js and src/reader/reader.js.