Package-level declarations

Types

Link copied to clipboard
class PdfReviewConfiguration(val marks: List<PdfMark>, val notice: String, val applyLabel: String = "Apply", val onApply: (List<String>) -> Unit, val onCancel: () -> Unit? = null)

Puts the viewer in review mode: marks over the page that a tap cycles, and a bar that always shows notice. The component does not apply anything; onApply does.

Link copied to clipboard
Link copied to clipboard
sealed class PdfToolbarItem

One control in the viewer's toolbar.

Link copied to clipboard
data class PdfViewerTheme(val accent: Color = Color(0xFF0066CC), val background: Color = Color(0xFFFBFBFD), val pageBackground: Color = Color.White, val pageShadow: Color = Color.Black.copy(alpha = 0.18f), val toolbarBackground: Color = Color(0xFFEFEFF3), val toolbarForeground: Color = Color(0xFF1D1D1F), val selectionStroke: Color = Color(0xFFFF9500), val redactionFill: Color = Color.Black.copy(alpha = 0.72f), val cornerRadius: Dp = 7.dp, val iconSize: TextUnit = 17.sp, val toolbarHeight: Dp = 44.dp)

How the viewer looks.

Functions

Link copied to clipboard
fun PdfViewerView(document: PdfDocument, modifier: Modifier = Modifier, toolbar: PdfToolbarConfiguration = PdfToolbarConfiguration.Default, theme: PdfViewerTheme = PdfViewerTheme.Light, review: PdfReviewConfiguration? = null, onSave: (ByteArray) -> Unit? = null)

A drop-in viewer: the page, gestures and a configurable toolbar.