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
$ npm install react-native-open-pdf --save
import OpenPdf from 'react-native-open-pdf';
const path = 'http://www.math.hawaii.edu/~pavel/gcd.pdf';
OpenPdf.open(path);
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. |
Parameter | Type | Description |
---|---|---|
chooserTitle (optional) | string | Default to "Open with" |