563
Views
10
Comments
Solved
Open document in new tab instead of downloading
Question
Application Type
Reactive

Hello, I need to open PDF's in a new tab instead of actually downloading them.
I tried to read other questions about this, but it seems that the download is either from traditional or it has changed...
In the first image it's my download logic. And has we can see below, the download that I see in other questions is different and has more properties.


How can I achieve this without installing new componentes from forge?
Any help is appreciated! :)


2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Ricardo,

I would suggest you refer this post - Preview PDF File Solution which address the same use case.

Sample App: Preview PDF_Demo


I hope this helps you!


Kind regards,

Benjith Sam

2024-06-13 07-53-34
Paulo Moreira
 
MVP

Hi Ricardo,

Please find attached an OML with a quick example of a possible solution for your question.

Basically, I created a secondary page, empty, without layout, and with an IFRAME on its root. ON that page, there is a data action that gathers the PDF file binary content, and binds it to the IFRAME src attribute.

Hope this helps.

Best regards,

Paulo Moreira

OpenPDFBinaryInTab.oml
2021-12-29 03-29-46
Ricardo Figueiredo

I have tried this solution... and instead of downloading I redirect it to another screen with the ifram but it appears empty.. 

the link is doing the same... and it worked with the download :/ so the data must be going correct :/

2021-05-21 09-12-32
Purva Kumbhar

Hi Ricardo,

You have to set the property like:-

Hope it helps you!

Thanks,

Purva


2021-12-29 03-29-46
Ricardo Figueiredo

I have tried that too and it doesn't work... 

Dont know why... :/

2021-05-21 09-12-32
Purva Kumbhar
2021-12-29 03-29-46
Ricardo Figueiredo

It's here. You will get a lot of errors, but its basically the first table the last icons... one is button another is a link, was trying both

GRC.oml
2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Ricardo,

I would suggest you refer this post - Preview PDF File Solution which address the same use case.

Sample App: Preview PDF_Demo


I hope this helps you!


Kind regards,

Benjith Sam

2021-12-29 03-29-46
Ricardo Figueiredo

This was exacly what I was looking for.. I searched for it in community and somehow didn't saw that reply from you! thanks man! :)

2021-03-18 21-03-15
Benjith Sam
 
MVP

You're welcome, Ricardo. Glad to help you :)


Kind regards,

Benjith Sam

UserImage.jpg
Rita Barbosa

The "PreviewPdfFileOnClick" was working perfectly for me but now for some reason it seems like it is not working properly in Chrome and edge (works as it used to in Safari and Firefox). 

Now it shows the document, I can see that the whole document is there, but in a weird way. (I added an image, I just uploaded a blank document)


Does anyone know why?

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