Package-level declarations
Types
Link copied to clipboard
Link copied to clipboard
data class PdfSearchHighlightStyle(val match: PdfSearchHighlightDecoration = PdfSearchHighlightDecoration(
fillColor = Color(0x66FFEB3B),
), val selectedMatch: PdfSearchHighlightDecoration = PdfSearchHighlightDecoration(
fillColor = Color(0x80FF9800),
strokeColor = Color(0xFFFF6D00),
strokeWidth = 1.dp,
))
Visual treatment for all matches and the currently selected match.
Link copied to clipboard
data class PdfSearchScrollAlignment(val verticalFraction: Float = DEFAULT_VERTICAL_FRACTION, val horizontalFraction: Float = DEFAULT_HORIZONTAL_FRACTION)
Position of a search result within the PDF viewport.
Link copied to clipboard
A page-scoped search match exposed by PdfViewState.searchResults.
Link copied to clipboard
Current document-search lifecycle.
Link copied to clipboard
Scroll, zoom, search, and render-cache state for PdfView.
Functions
Link copied to clipboard
fun PdfView(document: PdfDocument, modifier: Modifier = Modifier, state: PdfViewState = rememberPdfViewState(), pageSpacing: Dp = 12.dp, pagePadding: Dp = 0.dp, pageColor: Color = Color.White, maxRenderDimension: Int = 4096, onPageError: (pageIndex: Int, error: Throwable) -> Unit = { _, _ -> }, onLinkClick: (PdfLink) -> Boolean = { false }, pageBorder: BorderStroke? = BorderStroke(1.dp, Color(0x22000000)), pageLoadingContent: @Composable BoxScope.(pageIndex: Int) -> Unit = {}, pageErrorContent: @Composable BoxScope.(pageIndex: Int, error: Throwable) -> Unit? = null, onUriLinkClick: (uri: String) -> Unit? = DefaultOnUriLinkClick, onLinkError: (pageIndex: Int, link: PdfLink, error: Throwable) -> Unit = { _, _, _ -> }, maxZoom: Float = PdfViewState.DEFAULT_MAX_ZOOM, gestureZoomEnabled: Boolean = true, searchHighlightStyle: PdfSearchHighlightStyle = PdfSearchHighlightStyle.Default)
Displays every page in document as a vertically scrolling Compose view.
Link copied to clipboard
Remembers scroll position, zoom, search state, and the small page-render cache. Search results are document-bound and are not saved.