Pages Won't Scroll
The pdf renders alright, however it renders only the first page and doesn't scroll. Is there anything I am missing?
Is the iOS or android ?
I also got same problem in IOS. It is working good in android... Can anyone help me quickly please.
@sibeliusseraphini Can you help to fix?
@kamalkrishna3000 take a look in this branch https://github.com/cnjon/react-native-pdf-view/tree/feature/swift
it is almost done.
You can also use another component to scroll or swipe between pdf pages, for now it only show one page
I am facing this too.
I'm having issues with iOS scrolling as well
on android works great but on ios zoom out makes pdf view looks so little on the same pdfview and scrolling not working
same problem here
Any update on this? It's been many months since it was "almost done". Has it been merged? I'm guessing not since I installed the latest version a couple days ago and it still has this problem on iOS.
same problem here, any update on this please? 👍
I just gave up and rendered it using WebView on iOS.
@pedramsaleh i do the same, but i can not zoom :c
Maybe try react-native-quick-look? Using that now and zooming works fine.
Do not use this component to display PDF on IOS .
on IOS can use webview display PDF.
this.pdfPath = RNFS.DocumentDirectoryPath + /tour.pdf;
<WebView
source={{uri: this.pdfPath}}
style={{flex: 1, backgroundColor: 'white'}}
scalesPageToFit={true}
/>
'this.pdfPath' should be the path in Xcode project.
Can anyone solved this ? I am try using WebView but cannot open pdf Local Directory on iOS. my this.pdfPath = /Users/rezaarifiansyah/Library/Developer/CoreSimulator/Devices/3F9E5A72-FE37-42D0-AB99-84F86974373D/data/Containers/Data/Application/E350A5C9-212E-4EEA-9F61-6E1492810FB5/Documents/5d7d57f1abfac97dd29ff7c7ae159846
@NextChampion can you help me to use WebView .
Thanks
1 copy the Local path; 2 Open Finder ; 3 command + shift + g ; 4 paste ; 5 enter ; @rezaarifian
+1
Component would be even better with scroll...
Hi! In my project, I use https://github.com/philipshurpik/react-native-animated-tabs to make beautifully animated swiping between pages. Here is the example of render method you can try:
render() {
const {uri} = this.props;
const {pageCount} = this.state;
return <View style={commonStyles.flexContainer}>
{uri && <AnimatedTabs
panelWidth={Dimensions.get('window').width}
style={styles.tabs}
onMoveShouldSetPanResponder={(a, e) => {
return Math.abs(e.dx) > 30 && Math.abs(e.dx) > Math.abs(e.dy) * 1.5;
}}
>
{(new Array(pageCount)).fill().map((i, pageNumber) => <PDFView
key={pageNumber}
path={uri}
pageNumber={pageNumber + 1}
zoom={0.90}
borderWidth={0}
backgroundColor={colors.bgGray}
style={styles.pdf}
onLoadComplete={pageCount => this.setState({pageCount})}
/>)}
</AnimatedTabs>}
</View>
}