🌐
ComPDF
compdf.com › blog › build-an-android-pdf-viewer-or-editor-in-kotlin
Build an Android PDF Viewer or Editor in Kotlin | ComPDF
July 9, 2025 - ComPDF for Android is such a solution for developers to build an Android PDF viewer and editor to open PDF files, edit PDF content, and control the PDF content. In this guide, we'll dive into the steps required to integrate ComPDF into your ...
🌐
GitHub
github.com › muhammad-fiaz › PDF-Viewer
GitHub - muhammad-fiaz/PDF-Viewer: PDF Viewer: A simple yet powerful Android app built with Kotlin and Android Studio for viewing PDF documents seamlessly. Explore, read, and navigate through PDF files with ease. #Android #Kotlin #PDFViewer · GitHub
PDF Viewer: A simple yet powerful Android app built with Kotlin and Android Studio for viewing PDF documents seamlessly. Explore, read, and navigate through PDF files with ease. #Android #Kotlin #PDFViewer - muhammad-fiaz/PDF-Viewer
Author   muhammad-fiaz
🌐
Reddit
reddit.com › r/androiddev › pdf library for android kotlin
r/androiddev on Reddit: PDF Library for Android Kotlin
December 12, 2024 -

Any suggestion on free PDF library which can support dark mode, and remember last page. I am currently using Afreakyelf PDF viewer , it great and light but lacks dark mode. I am looking for something what MJ Pdf provides, but not that much. Do you have any suggestions? i looked for some commercial licences but they were way costly ...l have an app which displays notes for education purposes, all these notes are pdf's.

🌐
Nutrient
nutrient.io › android › viewer › kotlin
Kotlin PDF viewer library for Android features
Discover a fast and customizable Kotlin PDF viewer for Android, offering unique features like dark mode, text-to-speech, and annotation support.
🌐
GeeksforGeeks
geeksforgeeks.org › kotlin › load-pdf-from-url-in-android-with-kotlin
Load PDF From URL in Android with Kotlin - GeeksforGeeks
July 23, 2025 - <?xml version="1.0" encoding="utf-8"?> ... android:orientation="vertical" tools:context=".MainActivity"> <!--on below line we are creating our pdf view--> <com.github.barteksc.pdfviewer.PDFView android:id="@+id/idPDFView" android:layout_width...
🌐
GitHub
github.com › topics › pdf-viewer
pdf-viewer · GitHub Topics · GitHub
A lightweight Android PDF viewer library powered by Mozilla's PDF.js, offering seamless PDF rendering and interactive features. Supports both Jetpack Compose and Xml. android kotlin java pdf pdf-viewer compose pdfview pdfviewer pdf-js mozilla-pdf ...
🌐
Android Developers
developer.android.com › get started › jetpack › pdf
pdf | Jetpack | Android Developers
2 weeks ago - androidx.pdf:pdf-document-service:1.0.0-alpha05, androidx.pdf:pdf-viewer:1.0.0-alpha05, and androidx.pdf:pdf-viewer-fragment:1.0.0-alpha05 are released. Version 1.0.0-alpha05 contains these commits. ... This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers ...
🌐
GitHub
github.com › afreakyelf › Pdf-Viewer
GitHub - afreakyelf/Pdf-Viewer: A Lightweight PDF Viewer Android library which only occupies around 80kb while most of the Pdf viewer occupies up to 16MB space. · GitHub
<com.rajat.pdfviewer.PdfRendererView android:id="@+id/pdfView" android:layout_width="match_parent" android:layout_height="match_parent" app:pdfView_divider="@drawable/pdf_viewer_divider" app:pdfView_showDivider="false" /> and in your kotlin file ·
Starred by 1.2K users
Forked by 240 users
Languages   Kotlin 99.7% | Python 0.3%
Find elsewhere
🌐
Pdf-Viewer
afreakyelf.github.io › Pdf-Viewer
Pdf-Viewer | A Lightweight PDF Viewer Android library which only occupies around 80kb while most of the Pdf viewer occupies up to 16MB space.
<com.rajat.pdfviewer.PdfRendererView android:id="@+id/pdfView" android:layout_width="match_parent" android:layout_height="match_parent" app:pdfView_divider="@drawable/pdf_viewer_divider" app:pdfView_showDivider="false" /> and in your kotlin file ·
🌐
GitHub
github.com › danjdt › android-pdfviewer
GitHub - danjdt/android-pdfviewer: A Android PDF Viewer that render pdf using PdfRenderer and displays it in a RecyclerView.
A Android PDF Viewer that render pdf using PdfRenderer + kotlin coroutines and displays it in a RecyclerView.
Starred by 171 users
Forked by 33 users
Languages   Kotlin 100.0% | Kotlin 100.0%
🌐
Nutrient
nutrient.io › android › samples › pdf viewer kotlin
Kotlin PDF viewer example for Android | Nutrient Android SDK
Launch the default Kotlin-based PDF viewer UI and effortlessly load a PDF document in a web browser using Nutrient Android SDK’s PDF viewer library.
🌐
Medium
medium.com › @rjmittal07 › how-i-built-a-pdf-viewer-library-thats-both-lightweight-and-powerful-b238dc79d592
How I Built an Android PDF Viewer That's Lightweight and Powerful | Medium
April 24, 2025 - I chose to build the UI layer using standard Android Views: RecyclerView, TextView, and FrameLayout. There's no DataBinding, LiveData, or Compose as a core dependency — which helps keep the library lightweight and fast. That said, I already offer Compose support — it’s just not split into a separate module yet. That separation is on the roadmap, but the integration is usable today. The rendering pipeline is tightly managed inside PdfViewAdapter, using coroutine-powered page rendering and view recycling.
🌐
LinkedIn
linkedin.com › pulse › build-your-own-android-pdf-reader-kotlin-oyinkansola-olabode
Build your own Android PDF reader with Kotlin
February 5, 2021 - I’ll be explaining how to make an inbuilt pdf reader in your android application and also how to load a pdf file from your internal or external storage to your android application and enable previewing right in your app. But this tutorial will focus majorly on the first which is how to build ...
🌐
PSPDFKit
pspdfkit.com › blog › sdk › open pdf android
How to view PDFs on Android
February 27, 2026 - Basic viewers don’t include search. Nutrient SDK provides indexed full-text search across an entire document, returning results instantly, even in large PDFs. What if I need to support multiple platforms beyond Android? Nutrient offers SDKs for iOS, web, Flutter, React Native, and server-side processing. Documents and annotations stay consistent across all platforms, so users get the same experience everywhere. Android Kotlin PDF ·
🌐
Medium
medium.com › @chiragthummar16 › reading-pdf-files-made-easy-with-jetpack-compose-and-kotlin-63dd4637c298
Reading PDF Files Made Easy with Jetpack Compose and Kotlin | by Chirag T | Medium
July 10, 2023 - Whether you want to build a document viewer, an e-book reader, or simply integrate PDF file support into your application, Jetpack Compose with Kotlin is a powerful combination that can make the task seamless and efficient.
Top answer
1 of 1
3

The androidx.pdfviewer:pdfviewer does not offer any View that you can use. Instead, it offers a Fragment called PdfViewerFragment.

To display the PdfViewerFragment in Compose, you will need the following dependencies:

implementation("androidx.pdf:pdf-viewer-fragment:1.0.0-alpha04")
implementation("androidx.fragment:fragment-compose:1.8.5")

Next, the application style defined in your theme.xml must extend any Material3 theme:

<style name="Theme.ComposePlayground" parent="Theme.Material3.Light.NoActionBar" />

Finally, you can use the AndroidFragment Composable to display the PdfViewerFragment:

@Composable
fun PdfViewer(modifier: Modifier = Modifier, uri: Uri) {
    AndroidFragment<PdfViewerFragment>(
        arguments = bundleOf("documentUri" to uri),
        modifier = modifier
    )
}

The PdfViewerFragment takes the Uri from the Fragment arguments Bundle passed with key "documentUri". Note that currently, only Uris starting with

  • content://
  • file://

are supported, so you can't open online PDFs.

Example:

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun DocumentViewer() {
    var documentUri by remember { mutableStateOf<Uri?>(null) }
    val launcher = rememberLauncherForActivityResult(ActivityResultContracts.OpenDocument()) {
        documentUri = it
    }

    Column(
        horizontalAlignment = Alignment.CenterHorizontally
    ) {
        CenterAlignedTopAppBar(
            title = { Text("Document Viewer") }
        )
        FilledTonalButton(
            onClick = {
                launcher.launch(arrayOf("application/pdf"))
            }
        ) {
            Text(text = "Select Document")
        }
        documentUri?.let {
            PdfViewer(
                modifier = Modifier.weight(1f).fillMaxWidth(),
                uri = it
            )
        }
    }
}

Output:

Note:

The PdfViewerFragment still is in early development and might have bugs. Also, there are many limitations on the API levels where you can use it. I tested it on API35, but if you want to use it with an older minSdk, you might need to use SDK Extensions. The linter will tell you if you need to use them.

🌐
Nutrient
nutrient.io › sdk › android
Android PDF SDK | Kotlin and Jetpack Compose viewer
Bring PDF viewing, annotation, signing, form filling, and AI into any Android app — where users can work smoothly, even offline. Our Android PDF viewer SDK is built for modern Kotlin/Java development, so you can ship full-featured document ...
🌐
Stack Overflow
stackoverflow.com › questions › 67769918 › view-pdf-from-link-without-saving-downloading-in-android
kotlin - View PDF from link without saving/downloading in Android - Stack Overflow
Kotlin codes or helps will be much appreciated. Thank You!! ... As soon as the user can see that pdf document it is already downloaded i would say. ... If you follow this guide i think you can reach your achievement https://blog.mindorks.com/how-to-open-a-pdf-file-in-android-programmatically
🌐
Pdfviewer
pdfviewer.io › faq › android-how-to-open-pdf-viewer-from-my-app
[Android] How to open PDF Viewer from my app?
Posted in Android Updated on Nov 17 2020. Written by Robert Vojta · PDF Viewer implements Intents, which allows you to open PDF files programmatically. To open a PDF file from your application, you can use this Kotlin snippet:
🌐
Libhunt
android.libhunt.com › pdf-viewer-alternatives
Pdf Viewer For Android Alternatives - Android Kotlin | LibHunt
A Lightweight PDF Viewer Android library which only occupies around 80kb while most of the Pdf viewer occupies up to 16MB space. Tags: Kotlin, Android, Custom View, Android-library, PdfView, PDF, Android Pdf Viewer, Pdf Viewer, Lightwieght Pdf Viewer, Pdf View Library, Pdfrendererview.