Link to download PDF not opening in new tab

Hello!!

Working in the personal cloud platform 11 (that is awesome) I'm struggling to get a link to open a new tab in Chrome.

So we have a button:

And the button has some properties:

Hi Freek,

The destination should be an URL for the extended property to be effective, where the method is set to navigate.

There are several components in the Forge for viewing PDF in the browser. You could either try and use those or, install and look on how they manage to open the PDF in a new browser tab.

Some of the components are:

https://www.outsystems.com/forge/component-overview/444/pdf-viewer-by-lxis

https://www.outsystems.com/forge/component-overview/2661/pdfjs-viewer

https://www.outsystems.com/forge/component-overview/1281/web-previewer (allows view of more file types than only PDF files)

Regards,

Daniel

Solution

Hi, 

There is a simple method that can be used. 

1. Create a Web Screen for the sole objective of download the PDF. The preparation will end with a Download node. 

2. In your page with the link for download the PDF, change the link to navigate to the download page. The Target extended attribute will work.  

To let the page know which PDF file to download, you can use many different techniques, being the easiest to pass an input parameter and use it in the preparation to fetch the PDF. But other methods can be used depending on how are you fetching the PDF. 

This relies on the browser ability to show the PDF file.

To be sure that the file will be shown regardless of the browser, you can than use one of the PDF/file viewers suggested by Daniel. 

Hope this helps. 

Cheers. 

Solution