380
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.

Activity
Newest
Oldest
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.

Michael Wood
See if this works for you:
Patrik Horváth
Michael Wood: 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 :/
Michael Wood
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
Michael Wood: 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
Evan Bacon
Merged in a post:
Creating and editing PDFs in EXPO
Yuri Kravcenko
Library for creating and editing PDFs in React Native.
Would be good to have stuff for PDF in EXPO otherwise need Detaching app to ExpoKit.
Xavier Carpentier
Hi, just created a small lib using webview (with some limitations): https://github.com/xcarpentier/rn-pdf-reader-js
E
Elisandro Silva de Oliveira
Xavier Carpentier: Your rn-pdf-reader-js is really good, but it doesn't work with sdk 23 that's in the project's company, and if I upgrade to sdk 27, many things in the project won't work. It's the Expo in the project, and your lib only work with sdk 27 or above, please help me, could you?
Xavier Carpentier
Elisandro Silva de Oliveira: Thank you for your reply. Unfortunately this lib needs FileSystem and other stuff from SDK 27. But I'm not sure... (i'm a human :D) Maybe, please post an issue and I will check it when I have time!
Cadu Silva
Xavier Carpentier: Hi! Thanks for the lib! Just to make sure, does it work with local files? Would you have a sample or so? I couldn't make it work so probably there is something I'm missing or messing... Thanks!
Ali Husnain
Xavier Carpentier: your comments and replies are misguiding. I think there is no way to load pdf from local file system. simply give an example if it is possible or just say that offline files are not supported. I have seen your comment on almost every question related to show pdf in expo and you are misleading people. I have wasted a lot time due to your comments. thanks
Iradukunda Patrick
Xavier Carpentier: the problem with rn-pdf-reader-js, is that you can not read a downloaded pdf with it (local files) when offline!!
Thomas Pappas
Xavier Carpentier: Doesn't work anymore. Every dependency is deprecated.
Wédney Yuri
Same here, can be a simple solution to support only lollipop 5.0+ in the beginning.
Load More
→