[File Viewer Plugin] How to open PDF File inside the app

[File Viewer Plugin] How to open PDF File inside the app

  
Forge Component
(4)
Published on 22 Aug by Experts
4 votes
Published on 22 Aug by Experts

Hello,

I want to open PDF file inside the App, i have used file viewer plugin for this, but still it doesn't open, And the pdf url comes from the web services, i have perfectly consumed the web service  .

I have attached two screens... Seeing that screens you can easily understand what i want to do.



In Above screens when user click on Holiday List then PDF File should be open in another screen.


Thanks & Regards

Shivani Singhania


Solution

Hi Shivani,

Maybe there's a more elegant way to do it in a mobile app, but you could try to use this old webapp trick which is to use an IFrame whose "src" attribute is the URL to the PDF file. Here's a sample OML.

Solution

Aurelio Santos wrote:

Hi Shivani,

Maybe there's a more elegant way to do it in a mobile app, but you could try to use this old webapp trick which is to use an IFrame whose "src" attribute is the URL to the PDF file. Here's a sample OML.

Dear Aurelio,

Thanks for quick reply, Its working now for all other URL inside the app but not working for below URL.

Both URL is working on browser instead of outsystem app. Kindly help.

http://intra.rathi.com/download/Holiday List - 2017.pdf

http://intra.rathi.com/download/Holiday%20List%20-%202017.pdf


Shivani Singhania wrote:

Aurelio Santos wrote:

Hi Shivani,

Maybe there's a more elegant way to do it in a mobile app, but you could try to use this old webapp trick which is to use an IFrame whose "src" attribute is the URL to the PDF file. Here's a sample OML.

Dear Aurelio,

Thanks for quick reply, Its working now for all other URL inside the app but not working for below URL.

Both URL is working on browser instead of outsystem app. Kindly help.

http://intra.rathi.com/download/Holiday List - 2017.pdf

http://intra.rathi.com/download/Holiday%20List%20-%202017.pdf


Hi Shivani,

 It seems that you're problem is already solved.. the problem now is that your .pdf is on a http:// domain instead on https:// for that you can try creating your REST API to get the file and provide the pdf as output.


Cheers,