Skip to content

Latest commit

 

History

History
57 lines (36 loc) · 3.49 KB

File metadata and controls

57 lines (36 loc) · 3.49 KB

Native Catalog

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.

Running this Sample on Android

Requirements

Getting Started

  1. Clone the repository: git clone https://github.com/PSPDFKit/react-native.git
  2. Step into the NativeCatalog project's directory: cd react-native/samples/NativeCatalog
  3. Install dependencies: yarn install
  4. The NativeCatalog app is now ready to launch: react-native run-android

Running this Sample on iOS

Getting Started

  1. Clone the repository: git clone https://github.com/PSPDFKit/react-native.git
  2. Step into the NativeCatalog project's directory: cd react-native/samples/NativeCatalog
  3. Install dependencies: yarn install
  4. Go to the iOS folder: cd iOS
  5. Install the iOS pods: pod install
  6. Go back to the NativeCatalog directory: cd ..
  7. The NativeCatalog app is now ready to launch: react-native run-ios

Examples

Manual Signing

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.

Watermark

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.

Watermark on Startup

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.

Default Annotation Settings (Android only)

This example shows you how to change the default settings of the ink annotation when displaying a PDF file.

Instant Example (iOS only)

In this example, we bridged the native iOS Instant example from PSPDFKit Catalog over to React Native.