Closed barun1997 closed 2 years ago
I am not familiar with Native code, but this is my diagnosis so far (with help from parasharrajat)
It seems that on Android, we parse the file path, however, on iOs returns a further encoded URI string which throws an error.
I checked what this line returns if it's given an encoded URI string of: ...Sample%20file.pdf
and it is: ...Sample%2520file.pdf
This is the reason why for any file with a space in its name, the pdf ref is null.
I have the same problem on iOS, even if I get uri the file isn't displayed, just without spaces.
Is this duplicated? https://github.com/wonday/react-native-pdf/issues/488
What
react-native
version are you using? 0.68.0What
react-native-pdf
version are you using? 6.5.0What platform does your issue occur on? (android/ios/both) iOS
Describe your issue as precisely as possible :
1) Try previewing a PDF file with a space in the name
It returns load error