Skip to content

📄 PDF reader in JavaScript only for Expo - Android & iOS capable

License

Notifications You must be signed in to change notification settings

xcarpentier/rn-pdf-reader-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF reader for Expo

Android support 🚀





💥DEMO: https://exp.host/@dev-team-e-medicus/rn-pdf-reader-example

Read PDF just with JS

Example

import React from 'react';
import { StyleSheet, Text, View, WebView } from 'react-native';
import PdfReader from 'rn-pdf-reader-js';
import { Constants } from 'expo';

export default class App extends React.Component {
  render() {
    return (
      <View style={styles.container}>
        <PdfReader file="http://gahp.net/wp-content/uploads/2017/09/sample.pdf" />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    paddingTop: Constants.statusBarHeight,
    backgroundColor: '#ecf0f1',
  },
});

Requirements

Use it with Expo

What rn-pdf-reader-js use

  • react-pdf
  • WebView
  • Expo Document api
  • Base64
  • ...