0

In my RN application, I use react-native-pdf. I want to show a file which is in the file system of the app. But when I set the source it doesn't work and the app can't identify the path. How can I set the path properly?

<Pdf
  source={{ uri:'file:///terms.pdf'
/>
Shashika
  • 6,268
  • 11
  • 47
  • 80

1 Answers1

0

It should be below. when I tried that, it worked. And there is no bug about that on the repository of react-native-pdf. Maybe your version of react-native-pdf has bug. You should get this version => 5.1.6.

<Pdf
  source={uri:"file:///absolute/path/to/terms.pdf"}
/>
Kubilay Kiymaci
  • 412
  • 3
  • 14