I have a process where customer clicks if he wants a report to be generated and downloaded while creating a business unit. This report will be in pdf format.
Currently I am using Codeigniter and I use FPDF to generate pdf files.
The pdf opens well when it is requested. But
Problem: 1) PDF opens in the same tab. I would like the pdf to open up in new tab which I am kind of thinking how. "_target" will help me open the pdf in new tab if it is a pdf link. But here it is server side generated pdf. Hence "_target" will not work so I am looking for alternative on this.
2) After the pdf generates, the next line of code is not read. The execution actually stops here. I would like to know how I can make the process continue even after outputting pdf file.
Example
$pdf->Output($exampleArray, 'D'); // exampleArray carries all data to PDF and helps output the pdf and D forces FPDF to download PDF rather than opening it. Instead of 'D' I can use 'I' but that will output the pdf in same tab.
$this->continueNextFunction(); // This function should run and open the views in it.
From the above example I would love to see either PDF downloaded or 'opened in new tab' followed by next line executed helping the page to redirect and open required views.
Also please let me know if further explanation is required. I tried my best to explain the situation here. I had looked on this over google but I have not really found any solution on this.
Any help regarding this will be greatly appreciated.