I'm trying to open up a pdf in a new tab automatically when clicking on a link. How would I go about doing this? 


At the moment I'm able to redirect the link to a new page and on the preparation it downloads the pdf prompting the user to download the pdf and upon opening the pdf it open up on the default program. The problem is the pdf doesn't open up automatically after clicking the link and it doesn't open up on the web browser new tab.

Try the tag target="_blank".

<a target="_blank" href="yourfile.pdf">pdf</a>

Hi Nicholas Belo,

Can you please explain how have you implemented the current logic. If you are using  link to open the PDF then may be this will help. Please see the attached screen shot for help.

Add the below extended property :

target = "_blank"

Pranav Pandey wrote:

Hi Nicholas Belo,

Can you please explain how have you implemented the current logic. If you are using  link to open the PDF then may be this will help. Please see the attached screen shot for help.

Add the below extended property :

target = "_blank"

Thank you for your response. I have included the target as _blank already which works fine. I'm currently using a link to trigger this but it always prompts the user to download instead of automatically opening pdf.

Jardel Araújo wrote:

Try the tag target="_blank".

<a target="_blank" href="yourfile.pdf">pdf</a>


Thank you for responding where should I put the <a target="_blank" href="yourfile.pdf">pdf</a>

Hello Jardel


In the link you need to put target = "_blank" 

and after you need to change properties in download. 



Best Regards

Hello Nicholas, 

What you are looking for can be done with the iFrame widget that you can find in the Utilities (WebPatterns).

So, in this screen you open via the target=_blank, you put the iFrame widget and define the SourceURL as the download of the PDF you want. I believe that this should work.

Best Regards

Igor Khodak wrote:

Hello Jardel


In the link you need to put target = "_blank" 

and after you need to change properties in download. 



Best Regards

Thanks for the reply it's actually a url what could I do in this scenario.


Paulo Zacarias wrote:

Hello Nicholas, 

What you are looking for can be done with the iFrame widget that you can find in the Utilities (WebPatterns).

So, in this screen you open via the target=_blank, you put the iFrame widget and define the SourceURL as the download of the PDF you want. I believe that this should work.

Best Regards


Thank you for your response I can't use iFrame because it has to view on iPhone which doesn't do a good job support it.

Nicholas,

In the preparation of the screen that is accessed via the link, please use the download (as Igor said) at the end. Like this: Let us know if you have any further questions.

Nicholas Belo wrote:

Pranav Pandey wrote:

Hi Nicholas Belo,

Can you please explain how have you implemented the current logic. If you are using  link to open the PDF then may be this will help. Please see the attached screen shot for help.

Add the below extended property :

target = "_blank"

Thank you for your response. I have included the target as _blank already which works fine. I'm currently using a link to trigger this but it always prompts the user to download instead of automatically opening pdf.

are you calling a function on the link click that is generating the pdf ?


Paulo Zacarias wrote:

Hello Nicholas, 

What you are looking for can be done with the iFrame widget that you can find in the Utilities (WebPatterns).

So, in this screen you open via the target=_blank, you put the iFrame widget and define the SourceURL as the download of the PDF you want. I believe that this should work.

Best Regards

Hi Paulo,

What do you mean by defining the sourceURL as the download of the PDF. How to do that ? 

Regards,

Saiteja


Try this component pdfJS Viewer

It has a embedeed viewer to open pdf files in your browser.

Nuno Miguel Verdasca wrote:

Try this component pdfJS Viewer

It has a embedeed viewer to open pdf files in your browser.

Hi Miguel,

Thanks for responding soo quickly. 

Actually my requirement is not only for a PDF. 

I want to upload a file into the database (using upload widget and storing the data in binary) and retrieve it back and display in an iframe. Is there a way to achieve this. 

Regards,

Saiteja 


Hi Saiteja,

You have this component that can display multiple file types. The only limitation is that requires a open internet connection.

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi Saiteja,

You have this component that can display multiple file types. The only limitation is that requires a open internet connection.

Regards,

Marcelo

Hi Marcelo,

Thanks for responding.
I have seen the 'Web previewer' component. In the above discussions I have seen that, a file can be opened in an iframe by giving a link. ( posted by Paulo Zacarias ) pasting the same post below for reference.

"

What you are looking for can be done with the iFrame widget that you can find in the Utilities (WebPatterns).

So, in this screen you open via the target=_blank, you put the iFrame widget and define the SourceURL as the download of the PDF you want. I believe that this should work.

"

My question is is there a way to do like that, instead of using the web previewer component. 

Thanks in advance.

Regards,

Saiteja

Hi Saiteja,

Yes its possible. If you open the component you will see that is what it does but it doesn't use the iframe widget. Nevertheless on the screen will be the same thing is and iframe. If you want to see how just open the component and check how it was done.

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi Saiteja,

Yes its possible. If you open the component you will see that is what it does but it doesn't use the iframe widget. Nevertheless on the screen will be the same thing is and iframe. If you want to see how just open the component and check how it was done.

Regards,

Marcelo


Sure Marcelo, Thanks for the info. :)