Skip to content

shanbit200/Pdf-Viewer

 
 

Repository files navigation

Pdf Viewer For Android

A Simple PDF Viewer library which only occupies around 125kb while most of the Pdf viewer occupies upto 16MB space.

License HitCount

How to integrate into your app?

Integrating the project is simple, All you need to do is follow the below steps

Step 1. Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories:

allprojects {
  repositories {
    ...
    maven { url "https://jitpack.io" }
  }
}

Step 2. Add the dependency

dependencies {
    implementation 'com.github.afreakyelf:Pdf-Viewer:Tag'
}

How to use the library?

Okay seems like you have integrated the library in your project but how do you use it? Well its really easy just launch the intent with in following way:

open_pdf.setOnClickListener {
            startActivity(
                PdfViewerActivity.buildIntent(
                    context,                                                                      
                    "pdf_url",                                // PDF URL in String format
                    false,
                    "Pdf title/name ",                        // PDF Name/Title in String format
                    "pdf directory to save",                  // If nothing specific, Put "" it will save to Downloads
                    enableDownload = false                    // This param is true by defualt.
                )
            )
        }

That's pretty much it and you're all wrapped up.

Donations

This project needs you! If you would like to support this project's further development, the creator of this project or the continuous maintenance of this project, feel free to donate. Your donation is highly appreciated (and I love food, Tea and beer). Thank you!

PayPal

  • Donate 5 $: Thank's for creating this project, here's a Tea (or some beer) for you!
  • Donate 10 $: Wow, I am stunned. Let me take you to the movies!
  • Donate 15 $: I really appreciate your work, let's grab some lunch!
  • Donate 25 $: That's some awesome stuff you did right there, dinner is on me!
  • Or you can also choose what you want to donate, all donations are awesome!

Author

Maintained by Rajat Mittal

About

A Lightweight PDF Viewer Android library which only occupies around 125kb while most of the Pdf viewer occupies up to 16MB space.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Kotlin 100.0%