This second, Android only, Catalog example serves to show you how you can leverage the PdfView in your own view manager to provide more advanced integrations with PSPDFKit while still using react-native where possible.
- Clone the repository.
git clone https://github.com/PSPDFKit/react-native.git. - Install dependencies: run
yarn installfromsamples/NativeCatalogdirectory. - The Native Catalog app is now ready to launch. From
samples/NativeCatalogdirectory runreact-native run-android.
- Clone the repository.
git clone https://github.com/PSPDFKit/react-native.git. - Install dependencies: run
yarn installfrom thesamples/NativeCatalogdirectory. cd iosthen runpod install.- The Native Catalog app is now ready to launch. From
samples/NativeCatalogdirectory runreact-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.
In this example, we bridged the native iOS Instant example from PSPDFKit Catalog over to React Natice.