Socket
Socket
Sign inDemoInstall

react-native-open-pdf

Package Overview
Dependencies
514
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-open-pdf

Open pdf files using native app for Android


Version published
Weekly downloads
43
increased by7.5%
Maintainers
1
Install size
423 kB
Created
Weekly downloads
 

Readme

Source

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>

ParameterTypeDescription
pathstringThe absolute path where the file is stored or an url pointing to a pdf file
options (optional)ObjectSome options to customize the behaviour. See below.
Options
ParameterTypeDescription
chooserTitle (optional)stringDefault to "Open with"

Keywords

FAQs

Last updated on 21 Jan 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc