[File Viewer Plugin] PDF not opened in IOS

[File Viewer Plugin] PDF not opened in IOS

  
Forge Component
(4)
Published on 22 Aug by Experts
4 votes
Published on 22 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.