PSPDFKitView React Native UI component

PSPDFKitView is the PSPDFKit native UI component that enables you to integrate PSPDFKit directly into your custom components and modify and adjust the layout of the PDF view to your liking (with flexbox, etc.)

The example below renders two PSPDFKitView instances side by side:

...
export default class App extends Component<{}> {
  render() {
    return (
      <View
        style={{
          flex: 1,
          flexDirection: 'row',
          justifyContent: 'center',
        }}
        <PSPDFKitView
          document={DOCUMENT_A}
          style={{flex: 1, color: '#267AD4'}}
        />
        <PSPDFKitView
          document={DOCUMENT_B}
          style={{flex: 1, color: '#9932CC'}}
        />
      </View>
    );
  }
}
...

For more details and sample code, refer to the SplitPDF.tsx example and the PSPDFKitViewComponent.tsx example from our Catalog example project.

PSPDFKit for React Native also allows you to present a modal PDF view using the Native Module API. Here’s how you can open a PDF document using the Native Module API:

PSPDFKit.present(DOCUMENT, {});