Package-level declarations
Types
KiteCanvas backed by a Compose Multiplatform DrawScope.
Platform-supplied image decoder. KitePDF's core stays pure-Kotlin-stdlib; actual JPEG / PNG / etc. decoding rides on whatever the host platform already provides: Skia on Desktop, the OS framework on Android / iOS, createImageBitmap on JS.
Platform-supplied image decoder. KitePDF's core stays pure-Kotlin-stdlib; actual JPEG / PNG / etc. decoding rides on whatever the host platform already provides: Skia on Desktop, the OS framework on Android / iOS, createImageBitmap on JS.
Platform-supplied image decoder. KitePDF's core stays pure-Kotlin-stdlib; actual JPEG / PNG / etc. decoding rides on whatever the host platform already provides: Skia on Desktop, the OS framework on Android / iOS, createImageBitmap on JS.
Platform-supplied image decoder. KitePDF's core stays pure-Kotlin-stdlib; actual JPEG / PNG / etc. decoding rides on whatever the host platform already provides: Skia on Desktop, the OS framework on Android / iOS, createImageBitmap on JS.
Platform-supplied image decoder. KitePDF's core stays pure-Kotlin-stdlib; actual JPEG / PNG / etc. decoding rides on whatever the host platform already provides: Skia on Desktop, the OS framework on Android / iOS, createImageBitmap on JS.
Platform-supplied image decoder. KitePDF's core stays pure-Kotlin-stdlib; actual JPEG / PNG / etc. decoding rides on whatever the host platform already provides: Skia on Desktop, the OS framework on Android / iOS, createImageBitmap on JS.
Platform-supplied image decoder. KitePDF's core stays pure-Kotlin-stdlib; actual JPEG / PNG / etc. decoding rides on whatever the host platform already provides: Skia on Desktop, the OS framework on Android / iOS, createImageBitmap on JS.
Wraps the page's canvas to filter ink, inspect glyphs or insert drawing calls during the page paint pass. Return a KiteCanvas delegating unchanged calls to the supplied canvas. It already includes the optional reader theme, so custom colours pass through that theme too; paper and viewer overlays remain outside the decorator.
How KiteDocView lays its pages out and how the user moves between them.
Colours used by KiteDocView.
Observable state + control surface of a KiteDocView.
One entry of KiteDocViewState.highlights: where to paint (hit) plus how to paint it.
A tapped link the viewer cannot follow on its own, handed to KiteDocView's onLinkTap.
Which page margin an edge marker is painted in.
A KiteDocViewState.hitTest result: the page under a viewport point and the point in that page's own space (PDF: user space, y-up from the display box's bottom-left with rotation unfolded; EPUB: the page's document space).
Imperative page → ImageBitmap pipeline. This is the raster engine behind KiteDocView; it is public so apps with custom viewers (own pagers, thumbnail grids, PNG export jobs) don't have to re-implement the CTM/flip/hairline math themselves.
How KiteDocView turns pages into pixels. Pick a variant; each carries only the knobs that actually apply to it, so there are no settings that silently do nothing. Defaults to Rasterized via KiteRenderSpec.Default.
A continuous viewport anchor that a host can persist between reading sessions. location names the leading visible page, and offsetPx counts unzoomed layout pixels scrolled beyond that page's leading edge along the scroll axis. It works for vertical and horizontal continuous layouts, including right-to-left layout direction. It does not save zoom or cross-axis pan.
Which end of the selection a handle marks, in reading order.
Draws one selection boundary marker ("thumb") for KiteDocView.
Default look of KiteSelectionMenu's built-in chrome.
One action in a KiteSelectionMenu: a label, an optional leading icon slot, and what to do with the selected text.
A finalized or in-progress text selection on one page (cross-page selection is out of scope). start/end are INCLUSIVE flattened char indices into the page's io.github.yuroyami.kitepdf.core.KiteStructuredText reading order; text carries \n/\n\n line/block separators exactly like the extraction text; quads are display-space, one per line touched.
Zoom & pan behaviour for KiteDocView.
Functions
Encode this ImageBitmap to PNG bytes, the "saveable image" counterpart of KiteDocView's onPageRendered callback. Write the result to a file, share it, upload it; PNG is lossless so the export is pixel-identical to what was on screen.
Encode this ImageBitmap to PNG bytes, the "saveable image" counterpart of KiteDocView's onPageRendered callback. Write the result to a file, share it, upload it; PNG is lossless so the export is pixel-identical to what was on screen.
Encode this ImageBitmap to PNG bytes, the "saveable image" counterpart of KiteDocView's onPageRendered callback. Write the result to a file, share it, upload it; PNG is lossless so the export is pixel-identical to what was on screen.
Encode this ImageBitmap to PNG bytes, the "saveable image" counterpart of KiteDocView's onPageRendered callback. Write the result to a file, share it, upload it; PNG is lossless so the export is pixel-identical to what was on screen.
Encode this ImageBitmap to PNG bytes, the "saveable image" counterpart of KiteDocView's onPageRendered callback. Write the result to a file, share it, upload it; PNG is lossless so the export is pixel-identical to what was on screen.
Encode this ImageBitmap to PNG bytes, the "saveable image" counterpart of KiteDocView's onPageRendered callback. Write the result to a file, share it, upload it; PNG is lossless so the export is pixel-identical to what was on screen.
Encode this ImageBitmap to PNG bytes, the "saveable image" counterpart of KiteDocView's onPageRendered callback. Write the result to a file, share it, upload it; PNG is lossless so the export is pixel-identical to what was on screen.
Convenience entry point: remembers its own state internally. Takes any KiteDocument, so a PdfDocument and an io.github.yuroyami.kitepdf.epub.EpubDocument both go here.
THE KitePDF viewer composable. It draws a KiteDocument, so a PDF and an EPUB go through the same code path, the same gestures and the same widgets.
Previous / "x of y" / next pill. Buttons auto-disable at the ends.
A navigation panel over the document's outline (PDF bookmarks / EPUB table of contents): an indented, clickable column of KiteOutlineItems. Clicking an entry scrolls to its target (and calls onNavigate); on a book still paginating this lays out that one chapter rather than the whole book; entries without one (unresolvable destinations, grouping labels) render dimmed and unclickable. Plain foundation styling, like every widget here.
"current / total" page readout. Recomposes as the user scrolls or swipes.
The selection context menu: place it in KiteDocView's overlay slot and it appears whenever text is selected, listing items and, when highlightColors is non-empty, a wrapping row of colour swatches.
Horizontal strip of tappable page thumbnails; the current page is outlined. Tapping a thumbnail animates the KiteDocView sharing this state to that page.
Remembers a state reopened at a page and continuous scroll offset.
Remembers a KiteDocViewState opened at bookmark, a position saved from an earlier reading session.
Remembers a KiteDocViewState for document. Hoist it to drive a KiteDocView from anywhere: navigation buttons in your top bar, a zoom slider, a HUD overlay. The state object is the single point of control.
KitePageRasterizer wired to the composition's density, layout direction and font resolver.
rememberKitePageRasterizer with an explicit per-bitmap allocation ceiling.