Open PDF in new browser tab

Edwin

Member

Your current DaDaBIK version​

You are using DaDaBIK version 12.5-Aveto enterprise, installed on 18-01-2025 (installation code: 1828963427ddf2b161), the latest version of DaDaBIK is 12.5-Aveto released on 14-01-2025

You are running the latest release of DaDaBIK

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.

System info​

PHP Version: 8.1.31

mysql version: 8.0.39-cll-lve

Web server: LiteSpeed

Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36

URL installation: http://localhost/cims/
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Hi,

1738321375705.png

I am using this after user has pressed a custom button which works fine, but I would like to open the PDF in a new browser tab (exactly as the standard PDF does). After some attempts I still do not get it. Maybe it is not possible.

Anybody an idea how to do this?

Thanks!
 

Edwin

Member
I found a solution by putting the above line of code into a js script and change header to window.open. But it will not work smooth and user friendly. You will get some unwanted behavior in the UI (blanc screen in the app after you pressed the custom button print PDF) and the new browser window will be blocked by the popup blocker from the browser. Probably it can be done somehow with using html and let the browser know it is a new window after a click event of the end user to avoid the browser popup blocker kicks in. Anyway not a simple thing I would say (I am not a coder). I leave it for now and and stay with opening the PDF in the same window.
 
Top