Skip to content

Fit: size PDFs with wider pages to the widest page (v63) - #64

Merged
BPMData merged 1 commit into
mainfrom
claude/project-thread-2dt5qs
Nov 30, 2026
Merged

BPMData merged 1 commit into
mainfrom
claude/project-thread-2dt5qs

Conversation

@BPMData

@BPMData BPMData commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Before: in a PDF whose pages are not all the same width (for example a book with a landscape page), Fit sized everything to page 1. Wider pages stuck out past the edge of the screen until the window was resized.

After: as soon as a wider page's size loads, Fit re-fits to it, so every page fits beside the toolbar.

How: the background pass that loads page sizes was meant to re-fit when a page turned out wider than the rest, but it compared the page with a "widest page" figure that already included that page, so the check was never true. It now reads the widest width before the page counts. A new test in tests/book.spec.js checks that the book's landscape page 11 fits when Fit is on. Version bumped to v63.

PDF app only; the HTML overlay has no PDF pages, so nothing changes there. Nothing to try on the board beyond opening a PDF with a landscape page.


Generated by Claude Code

In a PDF whose pages are not all the same width, Fit only used the
first page's width. The check that should re-fit when a wider page's
size loads compared that page with the widest page so far, but the
page was already counted in "widest", so it was never wider and Fit
never re-ran. Wider pages stuck out past the edge until the window was
resized. Now the widest width is read before the page counts.

Adds a test on the book PDF (page 11 is landscape).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BPMData
BPMData merged commit c5503c0 into main Nov 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants