Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-pdf-view

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-pdf-view

view pdf file using react-native

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24
decreased by-14.29%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-pdf-view

React Native PDF View

Installation

npm i react-native-pdf-view --save

Usage

First, require it from your app's JavaScript files with:

import PDFView from 'react-native-pdf-view';

Example

'use strict';

import React,{
    Component,
    StyleSheet,
    View
} from 'react-native';

import PDFView from 'react-native-pdf-view';

export default class PDF extends Component {
    constructor(props) {
        super(props);
    }
    
    render(){
      <PDFView ref={(pdf)=>{this.pdfView = pdf;}}
                         src={"sdcard/pdffile.pdf"}
                         onLoadComplete = {()=>{
                            this.pdfView.setNativeProps({
                                zoom: 1.5
                            });
                         }}
                         style={styles.pdf}/>
    }
}
var styles = StyleSheet.create({
    pdf: {
        flex:1
    }
});

Configuration

PropertyTypeDefaultDescription
srcstringnullpdf absolute path
pageNumbernumber1page index
zoomnumber1.0zoom scale
onLoadCompletefunctionnullpage load complete

Keywords

FAQs

Package last updated on 29 Dec 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc