Is there any way to open the created pdf by dompdf to new browser tab ? I tried these. When I click the generate button (now it is a submit button) the controllers action is given below
Controller:
function generatePdf()
{
require_once("dompdf/dompdf_config.inc.php");
$data="this is a sample pdf";
$dompdf = new DOMPDF();
$html = $this->load->view('report/modelpdfview', $data, true);
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("mypdffile.pdf",array('Attachment'=>0));
$this->load->view('view/mysiteView', $data);
}
But it open on the same location which leads the user will lose control from the site. (I know there is back button in browser)