Viewer.Root owns zoom, rotation, scroll mode, columns and the page theme. All of them are bindable.
Copy to clipboard
Zoom
- Eased transitions.
viewer.zoomTo(z), the zoom steps,Zoom.Selectand fit-mode switches animate. Drive a slider withbind:value={() => viewer.zoom, (z) => viewer.zoomTo(z)}. - Anchored zoom. While pages are narrower than the view they stay centred; once wider, Ctrl/⌘ + wheel and pinch zoom around the cursor.
- Sharp zoom-ins. Below 100% pages render at up to twice the resolution (
oversampling), and during a long zoom a badly stretched page is refreshed once, so quick zoom-ins rarely look blurry.
Scroll modes, columns and spreads
When the column count changes, pages slide to their new place instead of jumping.
Rendering budget
Room for side notes
Pages always stay centred and side notes never add a scrollbar. Annotations.Margin sizes itself fromviewer.sideRoom (the free width beside the centred pages): full notes when they fit, narrower ones when space is tight (over the page's blank margin, never its text, if needed), and compact markers below minWidth (140 px by default). Hovering a marker shows the note, and clicking it opens the note in the popover. With fit-to-width, set --pdf-pages-aside: 272px on the viewport to keep that much room on each side for the notes (pages shrink by at most a quarter for it). Next to another page (a spread, Auto's grid, a horizontal strip) and on thumbnail-sized pages, notes are always markers; beside a neighbor they sit just past the page's edge (data-placement="gap"), painted above it.