Skip to content
New issue

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

iOS - Pages flicker between first page and the page you were on after navigating back into the PDF from another screen #880

Open
joffblack opened this issue Nov 6, 2024 · 0 comments

Comments

@joffblack
Copy link

What react-native version are you using?
0.70.6

What react-native-pdf version are you using?
6.6.2

What platform does your issue occur on? (android/ios/both)
iOS

Describe your issue as precisely as possible :
I am viewing the PDF. We are using enablePaging. In my example let's say i am viewing page 5.
In our app there are links overlayed on the PDF screen to navigate to a different screen in the app.
If i navigate to a this different screen and then go 'back' to the PDF screen, it starts to flicker between page number 1 and page number 5 (the page i was on previously).

This is only happening on iOS. If i do the same on Android, after going 'back' into the PDF it stays on page 5 - which is my intended outcome.

Show us the code you are using?

<Pdf
page={page}
scale={currentScale}
onScaleChanged={scale => setScale(scale)}
enablePaging={true}
source={source}
cache={false}
onLoadComplete={(numberOfPages, filePath) => {
setTotalPages(numberOfPages);
}}
onPageChanged={(page, numberOfPages) => {
pointsFunction(page);
setCurrentPage(page);
setPage(page);
}}
onError={error => {
console.log(error);
}}
onPressLink={uri => {
Linking.openURL(uri);
}}
trustAllCerts={false}
style={{...styles.pdf}}
/>

Any help would be appreciated!

RPReplay_Final1730927213.mov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant