Skip to content

Instantly share code, notes, and snippets.

@brunocarvalhodearaujo
Created May 7, 2018 16:49
Show Gist options
  • Save brunocarvalhodearaujo/4728c9006ebfc33f4bce1cbdbdbbfb08 to your computer and use it in GitHub Desktop.
Save brunocarvalhodearaujo/4728c9006ebfc33f4bce1cbdbdbbfb08 to your computer and use it in GitHub Desktop.
preview pdf react native app
import React, { Component } from 'react';
import { View, StyleSheet, WebView } from 'react-native';
import { Constants } from 'expo';
export default class App extends Component {
render() {
return (
<View style={styles.container}>
<WebView
bounces={false}
scrollEnabled={false}
source={{ uri: 'http://www.africau.edu/images/default/sample.pdf' }} />
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
paddingTop: Constants.statusBarHeight,
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment