Documentation Index
Fetch the complete documentation index at: https://mahmoud-b28887f9.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
KPdfViewerState exposes navigation and zoom as simple method calls, so you can wire them to any button, gesture handler, or keyboard shortcut in your UI. Gesture-based navigation and pinch-to-zoom are configured separately in KPdfViewerConfig before the viewer is created.
Page navigation
CallnextPage, previousPage, or goToPage on the viewer state. Each call updates currentPageIndex, which KPdfViewer observes and reacts to automatically.
goToPage takes a 0-based index, so page 10 is index 9.
You can read the current page at any time from the state flow:
Swipe-to-navigate
To let users swipe between pages, enableenableSwipe in your KPdfViewerConfig:
false if you want to restrict navigation to programmatic calls only.
Zoom controls
CallzoomIn, zoomOut, resetZoom, or setZoom to change the zoom level. Changes propagate to KPdfViewer through the currentZoom state flow.
setZoom directly:
Pinch-to-zoom and zoom range
Configure pinch-to-zoom and its limits inKPdfViewerConfig:
| Option | Description |
|---|---|
enableZoom | Enables pinch-to-zoom gestures on the viewer surface |
zoomRange | Sets the minimum and maximum zoom factors |
doubleTapZoom | Zoom factor applied when the user double-taps a page |