expo and RN pdf


#1

Hi everybody,

I know that issue has been posted so much time, but i don’t find a good option, so i hope somebody can help me, and maybe the community too.

I would like to open a pdf who is donwnoaded and stored by AsyncStorage. I can find the pdf, and check it’s completely downloaded, but i can’t display it.

I know the solution rn-pdf-reader-js is in progress, but does anybody knows a solution for displaying a pdf from asyncstorage ?

i apologize for my english who’s not good at all, hope this topic can create a discussion for this pdf issue,

(PS: use latest rn and expo version, use window for development)
Have a good day !


#2

Hi,
I second this, I have the same issue, so far I managed to use a Webview (with Google docs workaround on Android) to display a PDF from the web, but I need eventually to save it on asyncstorage and display it from there.

So far this solution https://github.com/xcarpentier/rn-pdf-reader-js requires Expo SDK 27, while recent React did some work to move Webview to third party packages, so this feature is in a sort of limbo.

I subscribed to a feature request to integrate PDF in Expo, I’d love to have a solution like https://www.npmjs.com/package/react-native-pdf which I used before migrating to Expo…

Anybody found an alternative route?

Thanks!
Umberto


#3

WOW…TODAY a new version of rn-pdf-reader-js was released…I tested it out with the last Expo (expo init with expo-cli 2.8.0)…and it works!
Thank you Xavier Carpentier!!!



#4

hi,
First i would like to thank you for you’r response!

I have try the new version of rn-pdf-reader, but doesn’t work for me. The pdf load but render a grey screen.

It’ weird because i use the same version of rn, expo and lib …

have you got some response for this issue ?

Thanks again