title: php how to save an fpdi object as a pdf file
body: <p>I'm using fpdi for creating/editing my pdfs, and was wondering how to save the output(essentially "save as" a pdf file) to the local harddrive?  Example:</p>
  
  <pre><code>$pdf = new FPDI();
  $pdf-&gt;setSourceFile("test.pdf");
  $page= $pdf-&gt;importPage(1);
  $pdf-&gt;addPage();
  $pdf-&gt;useTemplate($page);
  
  $pdf-&gt;Output();  // So instead of outputting to browser, how to save file as a pdf?
  </code></pre>
  
  <p>Basically instead of outputting the fpdi object, how do i save it as a pdf file?</p>