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 - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

package.json
{
"name": "react-native-pdf-view",
"version": "0.1.1",
"version": "0.1.2",
"description": "view pdf file using react-native",

@@ -5,0 +5,0 @@ "main": "PDFView.js",

# react-native-pdf-view
React Native PDF View
### Installation
```bash
npm i react-native-pdf-view --save
```
### Usage
First, require it from your app's JavaScript files with:
```bash
import PDFView from 'react-native-pdf-view';
```
### Example
```js
'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
| Property | Type | Default | Description |
| ------------- |:-------------:|:------------: | ----------- |
| src | string | null | pdf absolute path
| pageNumber | number | 1 | page index
| zoom | number | 1.0 | zoom scale
| onLoadComplete | function | null | page load complete
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