How to : PDF viewer on Android and iOS devices

Hi everyone,

I just tried to implement a PDF viewer on my app (with react-native-view-pdf for example). But it doesn’t works. If I understand well, I saw on this forum that’s because of Expo. Someone know why ?

Is there now a solution for that ? For now I just use the hack with Google Drive but that shows some commands that I don’t want to see on my app.

Thank you for help

Best wishes for the festive season :slight_smile:

Hi. Has you try with Print API? Print Api

I just look at the doc and tried this. It allows to print a document but don’t show on my app this document… :confused:

Hey @renadr,

react-native-view-pdf won’t work in a standard Expo project because it requires modification of native code. In order to use it, you would have to eject which creates the ios and android directories. A fellow exponaut @xcarpentier built a library to view PDF’s but due to some changes in the two latest version of RN I believe it’s broken at the moment. You can investigate here: Read PDF with Expo (ios & android) - #9 by colinkrist and the library is here: GitHub - xcarpentier/rn-pdf-reader-js: 📄 PDF reader in JavaScript only for Expo - Android & iOS capable

Cheers,

Adam

1 Like

@adamjnav Hi Adam. Can you help me please with one question posted yerterday that it’s urgent? Please, it’s related to Print Api.

Hey @adamjnav thank you for your answer.
I looked at the links you sent and yes it’s broken. At least I couldn’t get it to work. I’m thinking of stopping Expo in my project.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.