PSPDFKit – The leading framework for displaying and annotating PDFs on mobile.

  • present ( ‘document.pdf’ , {}) } render () { return ( < View style = { styles .
  • It’s easy to configure your PDF viewer.
  • It’s easy to present a full-featured PDF viewer in your React Native app.
  • The configuration dictionary is a mirror of the PSPDFConfiguration class.
  • We’re looking forward to pull requests that extend and improve the module.

PSPDFKit SDK – The leading framework for displaying and annotating PDFs on iOS, Android and the Web.

@PSPDFKit: PSPDFKit 💖 React Native! We’ve just open sourced our module with the iOS bindings; Android is coming in a few weeks.

React Native enables you to build native mobile apps using a consistent developer experience based on JavaScript and React. It’s built by Facebook and already used by thousands of apps in production. Motivated by the momentum and popularity of React Native, we had to give its users an easy way to use PSPDFKit in their projects.

That’s why we just open sourced our React Native module on GitHub. Now, it’s easy to present a full-featured PDF viewer in your React Native app. After you follow the installation steps from our README, you can present a PDF document like this:

import React , { Component } from ‘react’ ; import { AppRegistry , StyleSheet , NativeModules , Text , TouchableHighlight , View } from ‘react-native’ ; var PSPDFKit = NativeModules . PSPDFKit ; PSPDFKit . setLicenseKey ( ‘INSERT_YOUR_LICENSE_KEY_HERE’ ); class ReactNativeApp extends Component { _onPressButton () { PSPDFKit . present ( ‘document.pdf’ , {}) } render () { return ( < View style = { styles . container } > < TouchableHighlight onPress = { this . _onPressButton } > < Text style = { styles . text } > Tap to Open Document < /Text > < /TouchableHighlight > < /View > ); } } const styles = StyleSheet . create ({ container : { flex : 1 , justifyContent : ‘center’ , alignItems : ‘center’ , backgroundColor : ‘#F5FCFF’ , }, text : { fontSize : 20 , textAlign : ‘center’ , margin : 10 , } }); AppRegistry . registerComponent ( ‘ReactNativeApp’ , () => ReactNativeApp );

method.

method:

PSPDFKit . present ( ‘document.pdf’ , { thumbnailBarMode : ‘scrollable’ , pageTransition : ‘scrollContinuous’ , scrollDirection : ‘vertical’ })

Now the viewer uses continous vertical scrolling and a scrollable thumbnail bar:

The configuration dictionary is a mirror of the PSPDFConfiguration class.

With React Native it’s possible to write an iOS and Android app using the same code. Right now, we only provide a module for the iOS SDK, but support for Android is coming in the next few weeks.

You can find the PSPDFKit React Native module on GitHub. It’s open source, so you can customize it however you like. We’re looking forward to pull requests that extend and improve the module.

We’ll send you an email with your evaluation license and a link to download the PSPDFKit SDK. Looking for our PDF Viewer App instead?

The data you submit is treated confidentially and will never be disclosed to third parties. We may occaisonally send you product news and important announcements.

PSPDFKit – The leading framework for displaying and annotating PDFs on mobile.