> ## Documentation Index
> Fetch the complete documentation index at: https://mahmoud-b28887f9.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Install KPDF: add the Gradle dependencies to your app

> Add kpdf-core and kpdf-compose to your Kotlin Multiplatform Gradle build using the Kotlin or Groovy DSL, with notes on what each module provides.

KPDF installs as two Gradle dependencies. Declare both in your shared module's build file, sync, and you are ready to use the SDK.

## Current version

The current stable release is **1.0.0**.

## Add the dependencies

Add both modules to your shared Kotlin Multiplatform module's dependencies block:

<Note>
  You typically need both `kpdf-core` and `kpdf-compose` together. `kpdf-core` is the engine — it provides PDF loading, rendering, caching, and state APIs. `kpdf-compose` is the UI layer — it provides `KPdfViewer`, `KPdfViewerToolbar`, `KPdfThumbnailStrip`, and `rememberPdfViewerState`, plus the platform save/open flow bindings for Android and iOS. Without `kpdf-compose`, you have no Compose viewer components.
</Note>

<CodeGroup>
  ```kotlin build.gradle.kts theme={null}
  dependencies {
      implementation("com.mahmoud.kpdf:kpdf-core:1.0.0")
      implementation("com.mahmoud.kpdf:kpdf-compose:1.0.0")
  }
  ```

  ```groovy build.gradle theme={null}
  dependencies {
      implementation 'com.mahmoud.kpdf:kpdf-core:1.0.0'
      implementation 'com.mahmoud.kpdf:kpdf-compose:1.0.0'
  }
  ```
</CodeGroup>

If your project uses a version catalog, add the entries to `libs.versions.toml` first:

```toml theme={null}
[versions]
kpdf = "1.0.0"

[libraries]
kpdf-core = { module = "com.mahmoud.kpdf:kpdf-core", version.ref = "kpdf" }
kpdf-compose = { module = "com.mahmoud.kpdf:kpdf-compose", version.ref = "kpdf" }
```

Then reference them in your build file:

```kotlin theme={null}
dependencies {
    implementation(libs.kpdf.core)
    implementation(libs.kpdf.compose)
}
```

## What each module provides

| Module         | What it gives you                                                                                                                           |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `kpdf-core`    | `KPdfSource`, `KPdfViewerConfig`, `KPdfViewerState`, `KPdfFactory`, rendering, caching, navigation, zoom, save/export, and open state APIs  |
| `kpdf-compose` | `KPdfViewer`, `KPdfViewerToolbar`, `KPdfThumbnailStrip`, `rememberPdfViewerState`, and platform save/open flow bindings for Android and iOS |

## Verify the setup

After syncing, import a KPDF type in your shared code to confirm the dependency resolved:

```kotlin theme={null}
import com.mahmoud.kpdf_core.api.KPdfSource
import com.mahmoud.kpdf_compose.rememberPdfViewerState
```

If either import fails, check that Gradle sync completed without errors and that your repository configuration includes Maven Central or the GitHub Packages repository where KPDF is published.

## Next step

With the dependencies in place, follow the [Quickstart](/quickstart) to display your first PDF in a Compose composable.
