title: PDF openinng in new tab PHP mPDF
body: <p>I had a problem with the fact that in the latest versions of Google Chrome removed the possibility of Top-frame navigation (as vulnerability <a href="https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/GbVcuwg_QjM%5B101-125%5D" rel="nofollow noreferrer">Description's here</a>). I need to create a back-end PDF already with headers, etc and then open it in new browser tab. Which headers should I use correctly? As a library for the formation of the PDF document I use mPDF and YiiFramework.</p>
  
  <pre><code>$mPDF1 = Yii::app()-&gt;ePdf-&gt;mPDF('', 'A4', '8', '');
  $mPDF1-&gt;WriteHTML($html_data);
  $filename = 'pdf_' . time() . '.pdf';
  
  $mPDF1-&gt;SetHeader(
      'Content-type: application/pdf',
      'Content-disposition: inline; filename="' . $filename . '"',
      'Content-Transfer-Encoding: binary',
      'Accept-Ranges: bytes'
  );
  
  echo $mPDF1-&gt;Output($filename, 'I');
  
  
  
  
  
  if(objBrowse.appName == "Opera"){
      windowPrint = window.open('data:application/pdf;base64,'+data.content,  '_blank', 'width=800,height=600,resizable=yes,scrollbars=yes,status=yes');
  
  } else {
      //windowPrint = window.open('data:application/pdf;base64,'+data.content, '_blank');
      windowPrint = window.open(data.content, '_blank');
  }
  </code></pre>