[File Viewer Plugin] PDF not opened in IOS

Forge Component
(7)
Published on 28 Aug by Experts
7 votes
Published on 28 Aug by Experts

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:

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,


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!

Leandro Correa, MSc. Eng. wrote:

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:

Leandro Correa, MSc. Eng. wrote:

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.


Dear Leandro,


Its done as in my url there was some blank spaces in file name. Thatsy why it was not opening.


Now its working.

Thanks,



Hi dear Mohd! 

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,

Leandro.

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