Fix PDF zoom in scroll and paginated mode
All checks were successful
Build and push Docker image / build (push) Successful in 13s
Test / test (push) Successful in 16s

- Remove max-width:100% from .pdf-page so canvas can exceed container width
- Override max-width:65ch on .pdf-page-wrapper (inherited from reader-content > *)
- Apply pdfZoom factor in pdfSmartZoomPage so paginated mode respects the zoom slider

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
marwin 2026-03-20 20:02:29 +01:00
parent bb78afc569
commit 04818c939e
2 changed files with 3 additions and 2 deletions

View file

@ -1501,11 +1501,11 @@ body.dnd-mode .timer-display {
margin: 0 auto 1rem;
display: flex;
justify-content: center;
max-width: none;
}
.pdf-page {
display: block;
max-width: 100%;
box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
@ -1628,6 +1628,7 @@ body.dnd-mode .timer-display {
.reader-theme-sepia .reader-content { background:#f5e6c8; color:#3b2a1a; }
.reader-theme-bright .reader-content { background:#fff; color:#111; }
.reader-content > * { max-width:var(--reader-max-width,65ch); margin-left:auto; margin-right:auto; }
.reader-content > .pdf-page-wrapper { max-width: none; margin: 0 auto 1rem; }
/* Inline panels */
.reader-settings-panel, .reader-search-bar {

View file

@ -3549,7 +3549,7 @@ async function pdfSmartZoomPage(pageNum) {
const scale = Math.min(
(containerW - pad * 2) / contentW,
(containerH - pad * 2) / contentH
);
) * (readerSettings.pdfZoom / 100);
// Re-render canvas at new scale if significantly different
const currentScale = canvas.width / naturalVp.width;