Closed dysuryawanshi closed 4 years ago
Please try to give me solution as soon as possible this is live application we need to give update within single day. Actually it was working the previous one which is uploaded on playstore is working fine but now getting error.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hello Everyone, I found the solution for this, actually some devices don't have free memory storage. We need free space to open file that is the reason it gives us error file not found, because whenever we are accessing the pdf file it temp downloads in cache memory .
Thanks
Issue Description
[Getting error while using rn-pdf-reader-js]
{ "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "@expo/vector-icons": "^10.0.0", "@react-native-community/masked-view": "0.1.6", "@react-navigation/drawer": "^5.8.2", "@react-navigation/material-bottom-tabs": "^5.2.10", "@react-navigation/material-top-tabs": "^5.2.10", "@react-navigation/native": "^5.5.1", "@react-navigation/stack": "^5.4.2", "buffer": "^5.6.0", "crypto-js": "^4.0.0", "expo": "^37.0.0", "expo-av": "~8.1.0", "expo-constants": "^9.0.0", "expo-file-system": "^8.1.0", "expo-screen-orientation": "~1.0.0", "firebase": "7.9.0", "js-base64": "^2.5.2", "prop-types": "^15.7.2", "react": "16.9.0", "react-dom": "16.9.0", "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz", "react-native-firebase": "^5.6.0", "react-native-gesture-handler": "~1.6.0", "react-native-paper": "^3.10.1", "react-native-pdf": "^6.1.2", "react-native-reanimated": "~1.7.0", "react-native-safe-area-context": "0.7.3", "react-native-screens": "~2.2.0", "react-native-tab-view": "^2.14.4", "react-native-vector-icons": "^6.6.0", "react-native-web": "^0.11.7", "react-native-webview": "^8.1.1", "react-native-youtube": "^2.0.1", "react-navigation": "^4.3.9", "react-redux": "^7.2.0", "rn-fetch-blob": "^0.12.0", "rn-pdf-reader-js": "^3.1.0" }, "devDependencies": { "@babel/core": "^7.10.2", "babel-preset-expo": "^8.2.1" }, "private": true }
Steps to Reproduce / Code Snippets
PDF document viewer code
[import React, { Component, PropTypes } from 'react' import { StyleSheet, Dimensions, View , Text} from 'react-native'; import PDFReader from 'rn-pdf-reader-js' import {Appbar, Provider, DefaultTheme} from 'react-native-paper';
const theme = { ...DefaultTheme, roundness: 2, colors: { ...DefaultTheme.colors, primary: '#483D8B', accent: '#f1c40f', }, }; export function PDFDocument({route}){ return ( <PDFReader source={{ uri: route.params.PDFDocumentURL, //uri: {datavar}, }} withScroll='true'
/> ); }
const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'flex-start', alignItems: 'center', marginTop: 105, }, pdf: { flex:1, width:Dimensions.get('window').width, height:Dimensions.get('window').height, } });
export default PDFDocument]
Expected Results
[FILL THIS OUT]
Additional Information