We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What react-native version are you using? 0.75.2
react-native
What react-native-pdf version are you using? 6.7.5
react-native-pdf
What platform does your issue occur on? (android/ios/both) android
Describe your issue as precisely as possible : Issue is occurring on 6.7.5 but not reproducible on 6.7.4. Repro:
react-navigation
Join a screenshot or video of the problem on the simulator or device?
Show us the code you are using?
// App.tsx import * as React from 'react'; import {Button, View, Text} from 'react-native'; import {NavigationContainer} from '@react-navigation/native'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; import PDFExample from './PdfViewer'; function HomeScreen({navigation}) { return ( <View style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}> <Text>Home Screen</Text> <Button title="Go to Details" onPress={() => navigation.navigate('Details')} /> </View> ); } function DetailsScreen() { return <PDFExample />; } const Stack = createNativeStackNavigator(); function App() { return ( <NavigationContainer> <Stack.Navigator initialRouteName="Home"> <Stack.Screen name="Home" component={HomeScreen} /> <Stack.Screen name="Details" component={DetailsScreen} /> </Stack.Navigator> </NavigationContainer> ); } export default App; // PdfViewer.tsx import React from 'react'; import {StyleSheet, Dimensions, View} from 'react-native'; import Pdf from 'react-native-pdf'; export default class PDFExample extends React.Component { render() { const source = { uri: 'http://samples.leanpub.com/thereactnativebook-sample.pdf', cache: true, }; return ( <View style={styles.container}> <Pdf source={source} trustAllCerts={false} onLoadComplete={(numberOfPages, filePath) => { console.log(`Number of pages: ${numberOfPages}`); }} onPageChanged={(page, numberOfPages) => { console.log(`Current page: ${page}`); }} onError={error => { console.log(error); }} onPressLink={uri => { console.log(`Link pressed: ${uri}`); }} style={styles.pdf} /> </View> ); } } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'flex-start', alignItems: 'center', marginTop: 25, }, pdf: { flex: 1, width: Dimensions.get('window').width, height: Dimensions.get('window').height, }, });
The text was updated successfully, but these errors were encountered:
same issue, any update !
Sorry, something went wrong.
No branches or pull requests
What
react-native
version are you using?0.75.2
What
react-native-pdf
version are you using?6.7.5
What platform does your issue occur on? (android/ios/both)
android
Describe your issue as precisely as possible :
Issue is occurring on 6.7.5 but not reproducible on 6.7.4. Repro:
react-native-pdf
andreact-navigation
boilerplateJoin a screenshot or video of the problem on the simulator or device?
Show us the code you are using?
The text was updated successfully, but these errors were encountered: