React Native PDFView

screenshot of React Native PDFView

React Native PDFView

📚 PDF viewer for React Native


The react-native-view-pdf library is a tool for displaying PDF documents in React Native. It supports both Android and iOS platforms, offering various features and easy installation steps.


  • Android and iOS Support: Displays PDF documents on both Android and iOS platforms.
  • Multiple Resource Types: Supports rendering PDF from file, URL, or base64 data.
  • Resource Handling: Includes callbacks for successful loading and error handling.
  • Styling Options: Allows customization of the PDF viewer with styles like fadeInDuration and enableAnnotations.
  • Native Modules Autolinking: No need for manual linking on RN 0.60 and above.
  • Low Dependencies: Requires zero NPM dependencies for installation.
  • Quick Start Demo: Includes a demo project to test the component on both Android and iOS platforms.


To install the react-native-view-pdf library, follow these steps:

  1. Install the package:
$ npm install react-native-view-pdf --save
  1. For iOS using CocoaPods:

    • Add the following line to your Podfile:
    pod 'RNPdfViewerLib', :path => '../node_modules/react-native-view-pdf'
    • Run:
    $ cd ios && pod install
  2. For Android:

    • Add import to
    import com.rumax.reactnative.pdfviewer.PDFViewPackage;
    • Insert into getPackages():
    new PDFViewPackage()
    • Add lines to settings.gradle and app/build.gradle as specified in the documentation.


react-native-view-pdf is a versatile library for React Native, allowing developers to seamlessly display PDF documents on both Android and iOS platforms. With minimal dependencies, easy installation, and a range of features like custom styling and resource handling, it simplifies the integration of PDF viewing capabilities into mobile applications.


React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

React Native

React Native is a framework for building mobile applications using React and JavaScript. It enables developers to write once and deploy to multiple platforms, including iOS, Android, and the web, while providing a native app-like experience to users.


ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.


TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.