Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/afreakyelf/pdfViewer
Browse files Browse the repository at this point in the history
  • Loading branch information
afreakyelf committed Jan 24, 2021
2 parents 2d29707 + 6559d25 commit 9ee0f10
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@ dependencies {
## 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:

**IMPORTANT : Please make sure you have provided permissions for read and write from external storage. Check [MainActivity.kt](https://github.com/afreakyelf/Pdf-Viewer/blob/master/app/src/main/java/com/rajat/pdfviewer/MainActivity.kt) for reference.

```kotlin
open_pdf.setOnClickListener {
startActivity(
PdfViewerActivity.launchPdfFromUrl( // Use 'launchPdfFromPath' if you want to use assets file

// Use 'launchPdfFromPath' if you want to use assets file (enable "fromAssets" flag) / internal directory

PdfViewerActivity.launchPdfFromUrl(
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.
Expand Down

0 comments on commit 9ee0f10

Please sign in to comment.