This library requires a valid license of the Nutrient SDK. Licenses are per platform.
Work with a React Native PDF viewer SDK engineered for the best possible user and developer experience. Whether you need high-fidelity PDF rendering, annotation tools, digital signatures, or form filling, our React Native PDF SDK gives you complete control over PDF viewing and editing within your app.
The Nutrient SDK is a framework that allows you to view, annotate, sign, and fill PDF forms on iOS, Android, Windows, macOS, and Web.
Nutrient Collaboration adds real-time collaboration features to seamlessly share, edit, and annotate PDF documents.
Nutrient offers support for customers with an active SDK license via https://support.nutrient.io/hc/en-us/requests/new.
Are you evaluating our SDK? That's great, we're happy to help out! The Nutrient React Native SDK is a commercial product and requires the purchase of a license key when used in production. By default, this library will initialize in demo mode, placing a watermark on each PDF and limiting usage to 60 minutes.
To purchase a license for production use, please reach out to us via https://www.nutrient.io/sdk/contact-sales.
To initialize the Nutrient React Native SDK using a license key, call either of the following before using any other Nutrient SDK APIs or features:
To set the license key for both Android and iOS, use:
Nutrient.setLicenseKeys('YOUR_REACT_NATIVE_ANDROID_LICENSE_KEY_GOES_HERE', 'YOUR_REACT_NATIVE_IOS_LICENSE_KEY_GOES_HERE');
To set the license key for the currently running platform, use:
Nutrient.setLicenseKey('YOUR_REACT_NATIVE_LICENSE_KEY_GOES_HERE');
- A development environment for running React Native projects using the React Native CLI. If you’re using Expo, check out our blog post on the topic.
- React Native 0.87 or later (Expo SDK 58 or later)
- The latest stable version of Xcode
- The latest stable version of CocoaPods. If you don’t already have CocoaPods installed, follow the CocoaPods installation guide to install CocoaPods on your Mac.
- The latest stable version of Android Studio
- The Android NDK
- An Android Virtual Device or a hardware device
- Android Gradle Plugin 9.1 or later and Kotlin 2.4.10 or later. React Native 0.87 and later already use Android Gradle Plugin 9.2.1 and Gradle 9.4.1.
compileSdk37 withcompileSdkMinor1 (theandroid-37.1platform), andminSdk24
If your app minifies release builds, avoid Android Gradle Plugin 9.3.0–9.3.3 and 9.4.0–9.4.1. Their R8 removes a null check in
react-native-screens(b/558217403), so the app crashes at launch. Stay on 9.2.1, or pin R8 9.4.29 or later.
To install the Nutrient React Native SDK, run yarn add @nutrient-sdk/react-native in your project directory or npm install @nutrient-sdk/react-native if you’re using npm.
When using Expo prebuild/dev client, add the package as a plugin so Android AppTheme is switched to a MaterialComponents-compatible theme, and the generated Android project uses Kotlin 2.4.10 or later and compiles against android-37.1 or later:
// app.config.js
export default {
expo: {
plugins: ['@nutrient-sdk/react-native'],
},
};The plugin defaults to an edge-to-edge-friendly DayNight parent (@style/NutrientRN.AppTheme). You can override it:
// app.config.js
export default {
expo: {
plugins: [
[
'@nutrient-sdk/react-native',
{
androidThemePreset: 'fullNutrient',
// or provide a fully custom parent:
// androidAppThemeParent: '@style/YourCustomTheme',
},
],
],
},
};If you also set android.kotlinVersion with expo-build-properties, list @nutrient-sdk/react-native before it in plugins, or set 2.4.10 or later there. Otherwise the version from expo-build-properties replaces the one this plugin sets.
After updating app config, run npx expo prebuild -p android (or rebuild with EAS).
The SDK needs iOS 17 or later, and Expo SDK 58 apps default to iOS 16.4, so pod install can't resolve nutrient-sdk-react-native. Raise the deployment target with expo-build-properties:
// app.config.js
export default {
expo: {
plugins: [
'@nutrient-sdk/react-native',
['expo-build-properties', { ios: { deploymentTarget: '17.0' } }],
],
},
};See our Getting Started on React Native guide to integrate the SDK into your new or existing application, or follow the steps below:
-
In the terminal app, change the current working directory to the location you wish to save your project. In this example, we’ll use the
~/Documentsdirectory:cd ~/Documents
-
Create the React Native project by running the following command:
npx @react-native-community/cli init NutrientDemo
-
In the terminal app, change the location of the current working directory inside the newly created project:
cd NutrientDemo -
Add the Nutrient React Native SDK:
yarn add @nutrient-sdk/react-native
-
Install all the dependencies for the project:
yarn install
-
Open your project's
build.gradlefile:open android/build.gradle
-
Make sure Maven Central is in your repositories — Nutrient Android SDK is published there, so no custom repository is needed:
allprojects { repositories { mavenLocal() + mavenCentral() } }If you previously added
https://my.nutrient.io/maven/for the Nutrient SDK, you can remove it. Keep it only if you also use an add-on that isn't on Maven Central yet, such as OCR (io.nutrient:nutrient-ocr). -
Raise Kotlin in your project's
android/build.gradle. Nutrient's Kotlin metadata is built with Kotlin 2.4. The React Native template leaves the Kotlin Gradle plugin unversioned, so it has to be given the version as well:buildscript { ext { - kotlinVersion = "2.2.0" + kotlinVersion = "2.4.10" } dependencies { classpath("com.android.tools.build:gradle") classpath("com.facebook.react:react-native-gradle-plugin") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") } }Keep the Android Gradle Plugin 9.2.1 and Gradle 9.4.1 that React Native 0.87 and later come with.
-
Open the app’s build.gradle file and set the compile SDK's minor version:
... android { compileSdk rootProject.ext.compileSdkVersion + // Nutrient's AAR metadata requires the android-37.1 platform, so the minor version + // has to be set as well. + compileSdkMinor 1 ...compileSdkVersionin your project'sextblock is 37 in React Native 0.87 and later. If you lowered it, setcompileSdk 37in the app module. -
Open your project’s Podfile:
open ios/Podfile
-
Update the minimum iOS platform version in the Podfile:
... - platform :ios, min_ios_version_supported + platform :ios, '17.0' ...
-
Change the location of the current working directory to the
iosfolder:cd ios -
Install the CocoaPods dependencies:
pod install
-
Open your project’s Workspace in Xcode:
open NutrientDemo.xcworkspace
-
Make sure the deployment target is set to 17.0 or higher:
-
Change View controller-based status bar appearance to
YESin your project’sInfo.plist: -
Add the PDF document you want to display to your application by dragging it into your project. On the dialog that’s displayed, select Finish to accept the default integration options. You can use this QuickStart Guide PDF as an example.
-
Change the location of the current working directory back to the root project folder:
cd .. -
Create the
assetsdirectory:mkdir android/app/src/main/assets
-
Copy a PDF document into your Android assets directory:
cp ~/Downloads/Document.pdf android/app/src/main/assets/Document.pdf -
Open your
App.tsxfile:open App.tsx
-
Replace the entire contents of
App.tsxwith the following code snippet:import React, { Component } from 'react'; import { Platform } from 'react-native'; import NutrientView from '@nutrient-sdk/react-native'; import type { Nutrient as NutrientModule } from '@nutrient-sdk/react-native'; import { NativeModules } from 'react-native'; const Nutrient: NutrientModule = NativeModules.Nutrient; Nutrient.setLicenseKey(null); const DOCUMENT = Platform.OS === 'ios' ? 'Document.pdf' : 'file:///android_asset/Document.pdf'; export default class NutrientDemo extends Component<{}> { render() { var pdfRef: React.RefObject<NutrientView | null> = React.createRef(); return ( <NutrientView document={DOCUMENT} configuration={{ showThumbnailBar: 'scrollable', pageTransition: 'scrollContinuous', scrollDirection: 'vertical', }} ref={pdfRef} fragmentTag="PDF1" style={{ flex: 1 }} /> ); } }
-
The app is now ready to launch! Go back to the terminal app and run:
react-native run-ios
react-native run-android
Take a look at the instructions to get started here for iOS and here for Android.
The behaviour of the NutrientView component can be customized using the configuration object. Refer to the PDFConfiguration API documentation. The PDFConfiguration object can be passed as a prop when creating the NutrientView component, or a parameter when using the Nutrient.present() Native Module API.
const configuration: PDFConfiguration = {
showPageLabels: false,
pageTransition: 'scrollContinuous',
scrollDirection: 'vertical',
showThumbnailBar: 'scrollable',
};Some releases contain changes that require updates to your project settings or application code. Take a look at our Upgrade and Migration guides after updating your Nutrient React Native SDK dependency.
For Troubleshooting common issues you might encounter when setting up the Nutrient React Native SDK, please refer to the Troubleshooting section.
This project can be used for evaluation or if you have a valid Nutrient license. All items and source code Copyright © 2010-2026 PSPDFKit GmbH.
See LICENSE for details.



