Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-native-pdf-view
Advanced tools
React Native PDF View
npm i react-native-pdf-view --save
First, require it from your app's JavaScript files with:
import PDFView from 'react-native-pdf-view';
'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
}
});
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 |
FAQs
A pdf file view component for react native.
The npm package react-native-pdf-view receives a total of 22 weekly downloads. As such, react-native-pdf-view popularity was classified as not popular.
We found that react-native-pdf-view demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.