How to : PDF viewer on Android and iOS devices


#1

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:


#2

Hi. Has you try with Print API? Print Api


#3

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:


#4

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) and the library is here: https://github.com/xcarpentier/rn-pdf-reader-js

Cheers,

Adam


#5

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


#6

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.


closed #7

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