2287
Views
6
Comments
Solved
[File Viewer Plugin] How to open PDF File inside the app
Question
file-viewer-plugin
Mobile icon
Forge asset by OutSystems

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


2019-09-30 07-35-56
Aurelio Junior
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.

PdfSample.oml
UserImage.jpg
Shivani Singhania

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.

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

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


2016-11-14 13-50-04
David Martins

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.

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

https://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 https:// domain instead on https:// for that you can try creating your REST API to get the file and provide the pdf as output.


Cheers,

2023-06-10 09-22-21
Kaustubh Kamble

Aurelio Junior 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.

Hi Aurelio,

I know this is very old post, but I was trying the method you shared and it is working in browser as well as in Outsystems app but it is not working when I generate a native application and install it in android phone. So when I click on the document file name it redirects to next screen where I have created the iframe and displaying the document but it is showing blank screen in native application, but working fine in browser as well as in Outsystems app. Can you please where I am going wrong.

Thankyou  


2020-03-23 07-19-51
Sourabh Sapkade

hi 

Aurelio Junior
i did try Your Solution In Mobile App But Its Only Be Able to Use In Desktop Browser Not even on Mobile Chrome Browser As i  am going distribute this app as an PWA  So Is There any Other Option I Did Try File Plugin This Is ALso dont work

UserImage.jpg
Alpana Soni

Hi,

I'm also facing the same issue. Is there any other way to fix it?



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.