title: PDF Form Filling with FPDF
body: <p>There is a scripts section at fpdf.org that has an example for filling PDFs dynamically.  Here is the script.</p>
  
  <pre><code>&lt;?php
  
  /***************************
    Sample using a PHP array
  ****************************/
  
  require('fpdm.php');
  
  $fields = array(
      'name'    =&gt; 'My name',
      'address' =&gt; 'My address',
      'city'    =&gt; 'My city',
      'phone'   =&gt; 'My phone number'
  );
  
  $pdf = new FPDM('template.pdf');
  $pdf-&gt;Load($fields, false); // second parameter: false if field values are in ISO-8859-1, true if UTF-8
  $pdf-&gt;Merge();
  $pdf-&gt;Output();
  ?&gt;
  </code></pre>
  
  <p>First - they reference fpdm.php - i assume that is a mistake, and changed it to fpdf.php, as well as the class reference - so that isn't the source of my error.  When I change all that and set up a test - i get an error saying that the "orientation is wrong".</p>
  
  <p>Every other fpdf example has you entering paramaters into the function to set orientation (P or L) as well as size (A4) etc.  This one does not.  Has anyone messed with this example and gotten it to work?  We're using an HTML form on a doctors website to take info and then merging it with their actual forms and outputting them as a PDF for their charts - so a script like this where i can load the whole record in an array and pop them in the fields on the PDF would be fantastic.... if it worked :)</p>