I hope I make myself clear, but please ask me anything to clarify the problem. So, there is some workaround I can follow to load al the pages of my PDF in an IOS App? I need to point that I can't load the PDF in S3, google drive or something like that, I need to load it from a base64. Visit the Github repo Image base component: This is a very basic component that has a touch opacity container to contain the image and give us an onPress event. To install this open the terminal and jump into your project. Double tap to zoom for both iOS and Android. To use ImageViewer you need to install react-native-image-zoom-viewer package. The PDF in my App, it loads like an Imageīut when I try the same code (only the html one, I mean) in the browser, it loads perfectly, with the left navigation bar and the scroll functionality: React Native modal component for viewing images as a sliding gallery. Add the following line in the same snippet above the functional component. The issue I'm facing is that I can't scroll through the pages it have, I can only see the first page. Also, the width of the image component is calculated according to the screen of the devices width, using Dimensions from react-native. This is a portion of my code, if it helps to understand what I'm saying: Also, I discovered that react-native-fetch-blob also has a FileSystem. (Because RN fetch API does not yet support BLOBs). Firstly, I used the react-native-fetch-blob to request the pdf base64 from the server. react-native-pdf-view must take the file path to the pdfbase64. So, I posted the last week on SO, but I wanna to share it here too to see if someone could show me the light with this.Ĭoming to the point, In my application I receive a pdf in base64, so I use the component of the "react-native-webview" package to load my pdf in a "embed" tag (I also used the iframe and object tag, but the result is the same). For anyone having the same problem, here is the solution. Hi everyone! Hope you are doing great today :)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |