title: Open FPDF in new tab
body: <p>I have a pdf generated (fpdf) from a post form. I would like the pdf to open in a new tab and/or window prompting the user to save the pdf. I'm guessing I need to save the output to a string </p>
  
  <pre><code>$data=$pdf-&gt;Output("OfficeForm.pdf", "S");
  </code></pre>
  
  <p>but what exactly can I do with this string to get it to open in a new window. I've attempted something like this but it's not working. Am I on the right track or is window.open not what I need?</p>
  
  <pre><code>echo "&lt;script type=\"text/javascript\"&gt;      
  window.open('$data', '_blank')    
  &lt;/script&gt;";
  </code></pre>