Skip to content

Commit

Permalink
update readme to reflect new function signature
Browse files Browse the repository at this point in the history
  • Loading branch information
wiryadev committed Jan 18, 2025
1 parent d6123fe commit 7edd730
Showing 1 changed file with 3 additions and 35 deletions.
38 changes: 3 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,44 +155,12 @@ binding.pdfView.initWithUrl(
```

#### Using with Jetpack Compose

For Jetpack Compose, utilize `PdfRendererViewCompose` to render PDF files.

To render a PDF from a URL:

```kotlin
PdfRendererViewCompose(
url = "your_pdf_url_here",
)
```

To render a PDF from a local file:

```kotlin
PdfRendererViewCompose(
file = yourFile,
)
```

To render a PDF from a URI:

```kotlin
PdfRendererViewCompose(
uri = yourUri,
)
```

You can also provide arguments for additional parameters such as `modifier`, `headers`, `lifecycleOwner`, and `statusCallBack`:
For Jetpack Compose, utilize PdfRendererViewCompose:

```kotlin
PdfRendererViewCompose(
url = "your_pdf_url_here",
modifier = Modifier,
headers = HeaderData(mapOf("Authorization" to "123456789")),
lifecycleOwner = LocalLifecycleOwner.current,
statusCallBack = object : PdfRendererView.StatusCallBack {
// Override functions here
},
source = PdfSource.Remote("your_pdf_url_here"),
lifecycleOwner = LocalLifecycleOwner.current
)
```

Expand Down

0 comments on commit 7edd730

Please sign in to comment.