react-native-open-pdf
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

react-native-open-pdf

Open a pdf file or url that resolves to one using android native app ONLY FOR ANDROID

For a similar behaviour for ios, I recommend react-native-inappbrowser-reborn

Getting started

$ npm install react-native-open-pdf --save

Usage

Open a local file

import OpenPdf from 'react-native-open-pdf';

const path = 'http://www.math.hawaii.edu/~pavel/gcd.pdf';
OpenPdf.open(path);

API

open(path: string, options?: Object): Promise<void>

Parameter Type Description
path string The absolute path where the file is stored or an url pointing to a pdf file
options (optional) Object Some options to customize the behaviour. See below.

Options

Parameter Type Description
chooserTitle (optional) string Default to "Open with"

/react-native-open-pdf/

    Package Sidebar

    Install

    npm i react-native-open-pdf

    Weekly Downloads

    243

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    434 kB

    Total Files

    39

    Last publish

    Collaborators

    • arcollector