Repository navigation
Architecture
PDF Reader Pro is a single-module Android app written entirely in Kotlin, with a Jetpack Compose UI, organized as Clean Architecture with MVVM.
| Area | Library |
|---|---|
| UI | Jetpack Compose, Material 3 |
| Navigation | Navigation Compose with typed routes |
| Dependency injection | Koin |
| Database | Room (favorites, recent files, bookmarks, highlights, signatures) |
| Preferences | DataStore |
| Async | Kotlin Coroutines, StateFlow |
| PDF viewing | Mozilla PDF.js in a WebView |
| PDF processing | iText (merge, split, compress, rotate, pages, watermark, lock, unlock) |
| Images | Coil |
| Logging | Timber |
app/src/main/java/com/rejowan/pdfreaderpro/
├── data/ # Room database, DAOs, DataStore, repository implementations
├── domain/ # models and repository interfaces
├── presentation/
│ ├── components/ # shared Compose components, including the PDF viewer
│ ├── navigation/ # routes and navigation graph
│ ├── screens/ # home, folders, reader, tools, settings, onboarding
│ └── theme/ # Material 3 theme
├── di/ # Koin modules
└── util/ # file operations, versions, language, crash handling
Each screen has a Compose UI and a ViewModel that exposes a single state object as a StateFlow; the UI sends actions to the ViewModel.
The reader embeds PDF.js, bundled in app/src/main/assets/com/rejowan/mozilla/:
-
build/andpdfjs/are the PDF.js build and viewer. -
pdfjs/helper_main.jsandpdfjs/helper_methods.jsare the app's own scripts: they connect the viewer to Kotlin through a JavaScript interface and implement features such as reading themes, highlights, centering and the jump inset. -
web/cmaps/holds the character maps needed for Chinese, Japanese and Korean PDFs.
presentation/components/pdf/PdfViewer.kt wraps the WebView and exposes the viewer to Compose.
A few features edit the vendored PDF.js files directly. They're listed under Upgrading PDF.js in CONTRIBUTING.md, and BundledPdfJsPatchesTest fails if an upgrade drops one.
res/values/strings.xml is English. Other languages live in values-<code>/ and are synced from Crowdin. util/AppLanguage.kt lists the supported languages and applies the in-app language choice through AppCompat.
The app compares its version with the latest GitHub release (util/VersionUtils.kt), shows the release notes, and downloads and installs the APK on request.
PDF Reader Pro is free and open source under the GPL v3. Found something wrong in this wiki? Open an issue or ask in Discussions.
Using the app
- Installation
- Getting Started
- Reading PDFs
- Bookmarks, Highlights and Signatures
- PDF Tools
- Settings
- Languages and Translation
- Accessibility
- Troubleshooting and FAQ
- Privacy
Working on the app
Links