wonday / react-native-pdf

A <Pdf /> component for react-native
MIT License
1.6k stars 557 forks source link

pdf file not fully 100% loaded... stops after 80-90% #843

Open eminduyum opened 5 months ago

eminduyum commented 5 months ago

"react": "18.2.0", "react-native": "^0.74.2", "react-native-pdf": "^6.7.5", "react-native-blob-util": "^0.19.9",

Hello everyone...

pdf file loading stops at 93.47% or 86.56% or 96.48% etc... Not fully 100% loaded... issue occurs on android platform... but not tested on ios, maybe on ios platform will be occur...


System: OS: macOS 12.7.5 CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz Memory: 25.99 MB / 8.00 GB Shell: version: 5.8.1 path: /bin/zsh Binaries: Node: version: 22.0.0 path: /usr/local/bin/node Yarn: Not Found npm: version: 10.8.1 path: /usr/local/bin/npm Watchman: version: 2024.04.22.00 path: /usr/local/bin/watchman Managers: CocoaPods: version: 1.11.3 path: /Users/eminduyum/.rbenv/shims/pod SDKs: iOS SDK: Platforms:

eminduyum commented 5 months ago

Please any suggestion...

MAtif22SPP commented 5 months ago

i also found the same issue but working fine for android version 8 and above. why its not working for lower version, still i am searching for that.

eminduyum commented 5 months ago

i also found the same issue but working fine for android version 8 and above. why its not working for lower version, still i am searching for that.

yes, that's right... working fine for android version 8 and above but not lower version. searching too...

Abhishektaurus commented 5 months ago

It's coming on higher versions as well sometimes, it goes into loading state forever

kuldip-simform commented 4 months ago

Same for me

Logan-FE commented 3 months ago

ios is same is any fixed on this?

kuldip-simform commented 3 months ago

ios is same is any fixed on this?

           <Pdf
                trustAllCerts={globalMetrics.isIos}
                style={styles.pdfView}
                source={{ uri: url, cache: true }}
                onLoadComplete={() => {
                  setIsLoading(false);
                }}
                onError={() => {
                  setIsLoading(false);
                  setIsError(true);
                }}
                renderActivityIndicator={() => <LoaderView />}
              />

@Logan-FE This should work. I had this issue but I added trustAllCerts={Platform.os === 'iOS'} and it started working for me.

eminduyum commented 3 months ago

ios is same is any fixed on this?

           <Pdf
                trustAllCerts={globalMetrics.isIos}
                style={styles.pdfView}
                source={{ uri: url, cache: true }}
                onLoadComplete={() => {
                  setIsLoading(false);
                }}
                onError={() => {
                  setIsLoading(false);
                  setIsError(true);
                }}
                renderActivityIndicator={() => <LoaderView />}
              />

@Logan-FE This should work. I had this issue but I added trustAllCerts={Platform.os === 'iOS'} and it started working for me.

Thank you, I will try...

alexandravychytill commented 1 month ago

Hello For me the loading indicator does not even show beyond 0.00% and shows after loading straight the pdf. Is there maybe anything I can do about that? So when I use onLoadProgess and print the Progress it also only says 0.