pdf viewer
complete
De Lille Felix
I tried pdfjs, webview etc. But i want to show a pdf from documentPicker (local pdf).
With webGL extension on top of PDFjs it's possible but lots of work.
And the plugin react-native-pdf requires nativeModules
Evan Bacon
complete
React Native PDF works with Expo Dev Clients when used with the out-of-tree Config Plugin.
Here is an expo/example you can use to get started today.
We won't be adding React Native PDF to the Expo Go app (that you download from the App Store or Google Play Store) in the near future. You can use EAS Build with Test Flight or Internal Distribution to share links with your team.
I've also opened a PR into react-native-pdf to bring more visibility to the solution.
Bruno Pintos
I did this as a workaround, it works in Expo Go, expo version ~51.0.28
Firas
Hello developers! is there anyway else to show pdf content in app pls?
R
Roberto Oliveira
this happens when i tried to use itTypeError: null is not an object (evaluating 'ReactNativeBlobUtil.DocumentDir')
Wodin
Roberto Oliveira: Make sure you are not trying to run it in Expo Go and that you are not building with
expo build:android
or expo build:ios
.Evan Bacon
complete
Here is an expo/example you can use to get started today.
We won't be adding React Native PDF to the Expo Go app (that you download from the App Store or Google Play Store) in the near future. You can use EAS Build with Test Flight or Internal Distribution to share links with your team.
I've also opened a PR into react-native-pdf to bring more visibility to the solution.
Bruno Pintos
Evan Bacon "We won't be adding React Native PDF to the Expo Go app in the near future". Why that decision? Isn't this a popular feature? I believe is really basic and it should be on Expo Go.
Wodin
See if this works for you:
Patrik Horváth
Wodin: its good but android only :/
W
Wyatt Berlinic
Patrik Horváth: iOS simulator works for me.
Evan Bacon
Patrik Horváth: I can confirm that the plugin works for both platforms, not just Android. If you run into any issues, please open an issue on https://github.com/expo/config-plugins/issues
Julian
Evan Bacon: „This plugin is Android-only, and adds packaging options to the android/app/build.gradle dangerously.“
The description says it’s android only :/
Wodin
Julian: Not everything that uses native code needs a config plugin. In the case of
react-native-pdf
, the Android native code requires a config plugin, but the iOS native code does not. That's why the config plugin only makes Android-related changes.There's currently no absolutely safe way to make modifications to the
app/build.gradle
file, which is why it's marked as dangerous. This just means there's a chance than two different config plugins that modify the file could conflict. But it's not like "this plugin is going to shoot your dog" dangerous. Hopefully the Expo team will find a safe way to update app/build.gradle
in future, but it should still be fine for you to try it.Julian
Wodin: works :)
Brent Vatne
we're focused on making it possible to add any library to managed expo apps, you can read about it here https://blog.expo.io/expo-managed-workflow-in-2021-d1c9b68aa10
Artem Goncharuk
I want to use the module (https://github.com/wonday/react-native-pdf) in my app too. The module "rn-pdf-reader-js' doesn't work on iOS (SDK 33+)
Craig Walker
Let's go Evan Bacon - bring home the bacon with this one!
Mickael Lecoq
The PDF Viewer is the missing piece that forces me to eject my app. (notably to view pdf on android - rn-pdf-reader-js is limited on Android). Could we expect to have this feature in a future release of Expo ?
Evan Bacon
under review
Load More
→