KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Open in new Tab/Window #296

Open Mark.smith opened this topic on on May 25, 2018 - 3 comments

Mark.smith commented on May 25, 2018

Hello, is it possible to render a pdf in a new Tab or Window? thanks Mark

KoolReport commented on May 26, 2018

Yes, it is possible. At client-side, you create a <a> link with target='_bank', the href will be pointing to the handle php file. In the handle file, in order to force PDF open in browser instead of downloading you do:

$report->run()->export()->pdf()->toBrowser("myfile.pdf",true);

The second parameter true indicate that file will be open on browser.

Hope that helps.

gentlegriffon commented on May 3, 2020

@ KoolReport, I have the same issue, your suggestion doesn't answer the question. Is there a way to open in a new tab not the same tab??

KoolReport commented on May 4, 2020

May I know exactly your issue. Could you please describe the current state.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

None