1

I have been trying to open documents like (pdf, docx, xslx) file into (inside the app, not in any other installed app) my react-native application. From research I got some PDF viewer only that will be used to open pdf inside the app but not the other two types DOCx and XSLx.

I got some doc-viewer also, that full fill some of my requirement that it can be used to open document of all three of it's type but in other installed app not inside my react-native app.

I have created demo projects for these and checked but non of it help me with my requirements.

Purvik Rana
  • 331
  • 7
  • 17

1 Answers1

1

For the developers, We can use WebView from 'react-native-webview' module to display docs from URL. I have done as below,

<WebView
    source={{ uri: `https://drive.google.com/viewerng/viewer?embedded=true&url=${YOUR_URL}`}}
    startInLoadingState={true} />

Important part is https://drive.google.com/viewerng/viewer?embedded=true&url=${} which will display your doc from URL.

Purvik Rana
  • 331
  • 7
  • 17