This second Catalog example serves to show you how you can leverage PdfView
(Android) and PSPDFViewController
(iOS) in your own view manager to provide more advanced integrations with PSPDFKit while still using React Native where possible.
- A development environment for running React Native projects using the React Native CLI (not the Expo CLI).
- The latest stable version of Android Studio.
- The Android NDK.
- An Android Virtual Device or a hardware device.
- Clone the repository:
git clone https://github.com/PSPDFKit/react-native.git
- Step into the NativeCatalog project's directory:
cd react-native/samples/NativeCatalog
- Install dependencies:
yarn install
- The NativeCatalog app is now ready to launch:
react-native run-android
- A development environment for running React Native projects using the React Native CLI (not the Expo CLI).
- 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.
- Clone the repository:
git clone https://github.com/PSPDFKit/react-native.git
- Step into the NativeCatalog project's directory:
cd react-native/samples/NativeCatalog
- Install dependencies:
yarn install
- Go to the iOS folder:
cd iOS
- Install the iOS pods:
pod install
- Go back to the NativeCatalog directory:
cd ..
- The NativeCatalog app is now ready to launch:
react-native run-ios
This example shows you how to use the SignaturePickerFragment
and SignatureSignerDialog
on Android and PSPDFSignatureViewController
on iOS to digitally sign a document after a react button was pressed. The relevant part is the performInkSigning
method in the CustomPdfViewManager
on Android and -[CustomPDFView startSigning]
on iOS.
This example shows you how to use the PdfProcessor
on Android and PSPDFRenderDrawBlock
on iOS to put a watermark on the currently displayed document, save it to a new path, and display it. The relevant part is the performWatermarking
method in the CustomPdfViewManager
and -[CustomPDFViewcreateWatermarkAndReloadData:]
on iOS.
This example shows you how to use the PdfProcessor
on Android and PSPDFRenderDrawBlock
on iOS to put a watermark on the currently displayed document on startup, save it to a new path, and display it. The relevant part is the performWatermarking
method in the CustomPdfViewManager
and -[CustomPDFViewcreateWatermarkAndReloadData:]
on iOS.
This example shows you how to change the default settings of the ink annotation when displaying a PDF file.
In this example, we bridged the native iOS Instant example from PSPDFKit Catalog over to React Native.