webview-pdf-viewer
1.0.4indexedNative WebView-based PDF viewing with direct URL loading, smooth scrolling, pinch-to-zoom, page indicators, dynamic titles, LRU bitmap caching, lifecycle-aware back navigation, coroutine-friendly API.
Native WebView-based PDF viewing with direct URL loading, smooth scrolling, pinch-to-zoom, page indicators, dynamic titles, LRU bitmap caching, lifecycle-aware back navigation, coroutine-friendly API.
A powerful Kotlin Multiplatform PDF Viewer library for Android and iOS using native platform WebView implementations.
Built with:
Supports direct PDF URL loading with native behavior on both Android and iOS.
implementation("io.github.karun02525:webview-pdf-viewer:1.0.3")
✅ Direct PDF URL loading ✅ Native Android WebView support ✅ Native iOS WKWebView support ✅ Compose Multiplatform support ✅ Native back navigation support ✅ Dynamic title support ✅ Zoom support with gestures ✅ Pinch-to-zoom support ✅ Page indicator support ✅ Smooth scrolling behavior ✅ Native PDF rendering ✅ Loading state callback ✅ Lightweight implementation ✅ Shared KMP module support ✅ LRU memory management ✅ Optimized bitmap memory handling ✅ Android & iOS native behavior ✅ Simple API integration ✅ Production-ready architecture ✅ Coroutine support ✅ Fast PDF loading ✅ Native lifecycle handling ✅ Gesture support ✅ Modern Compose UI support
Uses native Android WebView
Uses native iOS WKWebView
repositories {
mavenCentral()
}
implementation("io.github.karun02525:webview-pdf-viewer:1.0.3")
OpenWebView(
modifier = Modifier.fillMaxSize(),
url = "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
)
https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
| Platform | Support |
|---|---|
| Android | ✅ |
| iOS | ✅ |
This library includes:
preview/demo.mp4screenshots/
├── android-preview.png
└── ios-preview.png
# Tech Stack
- Kotlin Multiplatform
- Compose Multiplatform
- Android WebView
- iOS WKWebView
- Kotlin Coroutines
---
# Project Structure
```text
shared/
├── commonMain
├── androidMain
└── iosMain
🚀 PDF download support
🚀 Thumbnail preview
🚀 Search inside PDF
🚀 Dark mode improvements
Karun Kumar
📧 Email
karunkumar02525@gmail.com
📱 Phone
8920828585
🌐 GitHub
https://github.com/karun02525
https://github.com/karun02525/webview-pdf-viewer
Apache License 2.0
Licensed under the Apache License, Version 2.0
http://www.apache.org/licenses/LICENSE-2.0
Pull requests and contributions are welcome.
If you find issues or want improvements, feel free to create an issue or PR.
If you like this project, please ⭐ the repository on GitHub.
Surfaced from shared tags and platforms — no rankings paid for.