title: get data from pdf string and display
body: <p>I'm creating a pdf from formdata using fpdf (<a href="http://www.fpdf.org/" rel="nofollow">http://www.fpdf.org/</a>).</p>
  
  <p>Using Jquery I'm able to send the data to the pdf-creating script, and make the pdf appear in browser.</p>
  
  <p>Now I'm trying to return the pdf-data to the formpage using fpdf's option to get the pdf as a string and echoing it. </p>
  
  <pre><code>$pdf_file_contents = $pdf-&gt;Output("","S");
  echo $pdf_file_contents
  </code></pre>
  
  <p>My question now is</p>
  
  <p>How do I use this data to preview the pdf under the form?<br>
  Do I need to use an pdf-viewer or can I use an <code>&lt;iframe&gt;</code> and am I doing this the correct way by returning the variable in an echo?</p>