I am opening a PDF file from a URL. It is working fine in android but when i am trying in IOS it is not opening. It showing me blank . It is not showing any error.
Below is my app screenshot.
Hello mohd,
We have implemented in the following way.
First we save the file to the external storage of the device
After that we show the file that was stored in the device.
Let me know if it worked?
regards,
Davide Periquito wrote:
Dear David,
Thanks for your response. i have to save the file from a URL so when i am saving it is showing me error: "The string contains invalid characters".
GeDataFromUri:
SaveFile:
In that scenario I think that using the PDF url on the filePath field instead of the urlFile field should do the trick.
Additionally, I can see that you use the getfileURI after the save, why don't you use the filepath returned by the savefile action directly on the opendocument action
Leandro Correa, MSc. Eng. wrote:
Dear Leandro,
I don't have binary data, i have to download the file from URL and save it. Then only i can open it.
Hi dear Mohd!
So, you can use the propertie urlFile instead filePath.
I hope this help you!
Hi Dear Leandro,
As you will see in my first screen shot i am doing in the same way. It is working on android but it not showing any content on IOS.
mohd hasib wrote:
Its done as in my url there was some blank spaces in file name. Thatsy why it was not opening.
Now its working.
Thanks,
I’m glad to know that it’s works now!
Best Regards,
Leandro.
Hi,
Im getting some issues with IOS. I uploaded a PDF manual as resources to a mobile app. Then I tried to open it with this implementation. When I click the link I get some share, copy and save options. If I click the save option a blank page start opening but quickly close and it goes back to the mentioned options (kind of a loop). With copy and share I didn't get anything except when a I choose google drive that I got a file with a diferente name. But never change from waiting status.
Seem that I have to do some file conversión but I not sure.
I tried File Plugin but when I used I didn't any response from the open link.
Any help please.
Regards,
Domingo
Hi Domingos,
Check if you mark the propertie Deploy Action on the resource.
And in the OpenDocument action, you'll need to use the complete URL in the filePath
In the next time, please open a new topic.
Best regards,
I want to view file in same screen by using file viewer its getting open in new tab
Kindly suggest to open in same screen
Thanks
Hi Deepak,
Would be better if you open a new topic.
Take a look at this other component:
https://www.outsystems.com/forge/component-overview/6223/mobile-pdf-preview
Hello everyone! I was facing the same struggle with PDF handling for iOS and Android. So after a few days of search and trying differents approachs I came to this simple solution:
Basically you need to implement two solutions for the differents OS:1) In case of Android the "Save File" and "Open Document" works really well but not for iOS;2) In case of iOS you need to use the specific action "Open System Browser" that only works for iOS from the "InAppBrowserPlugin";*In my case I get a PDF "Binary Data" from a REST service so in iOS it opens the system's browser and for android downloads the PDF file and open the same.