fun PdfViewer(
uri: Uri,
modifier: Modifier = Modifier,
onError: () -> Unit
) {
AndroidView(
factory = {
PDFView(it, null).apply {
fromUri(uri).onRender { _, _, _ ->
fitToWidth()
}
.onError { onError() }
.load()
}
},
modifier = modifier
)
}```
the above works fine with the normal phone but it uses to create error on Samsung fold 5 devices and Samsung high ends phone like Samsung s23 ultra