KiteLinkAction
A tapped link the viewer cannot follow on its own, handed to KiteDocView's onLinkTap.
In-document jumps never arrive here: the viewer scrolls to the target page itself. What reaches you is everything else, and it differs by format, so this type carries the format-native payload instead of flattening it:
EPUB links are plain hrefs, so they arrive as Uri.
PDF links carry a whole
/Aaction dictionary (a URI, a remote GoTo, a Launch, JavaScript, a form submit), so they arrive as Pdf with the parsed PdfAction untouched.
Opening web links needs no when, because both cases answer uri:
onLinkTap = { link -> link.uri?.let { openInBrowser(it); true } ?: false }Content copied to clipboard