Closed ToxicFrog closed 1 year ago
v0.10.5 has changed the shrink-to-screen setting into a fit-to-screen setting that should enlarge small pages.
As of 0.14 this is back to behaving as shrink-to-screen.
Updated fix:
div.page img.fitToScreen,
div.pdfPage.fitToScreen > div > canvas {
height: 100vh !important;
width: 100vw !important;
object-fit: contain;
}
div.page img.fitToHeight,
div.pdfPage.fitToHeight > div > canvas {
height: 100vh !important;
object-fit: contain;
}
div.page img.fitToWidth,
div.pdfPage.fitToHeight > div > canvas {
width: 100vw !important;
object-fit: contain;
}
I think I've mostly solved this in v1.0.0
. Like 85% solved. There are some tradeoffs, but with any luck your use case falls into the solved part.
Seems fixed for my uses!
For most professionally produced comics the main problem is the pages being larger than the screen, but there's a lot of indie stuff, archived webcomics, old scanlations, etc that is drawn or scanned at a lower resolution and is smaller than the screen size on modern displays. When viewing these in Codex it results in a small page floating in a sea of blackness. It would be nice to have an option in Codex to enlarge these to the screen.
The following CSS is not production-ready and won't work on PDFs, but accomplishes this for CBZs by hijacking the existing "fit to" logic to expand small images as well as shrinking large ones: