title: PDFTK to fill form
body: <p>I found this code</p>
  
  <pre><code>function createFDF($file,$info){
  $data="%FDF-1.2\n%âãÏÓ\n1 0 obj\n&lt;&lt; \n/FDF &lt;&lt; /Fields [ ";
  foreach($info as $field =&gt; $val){
  if(is_array($val)){
  $data.='&lt;&lt;/T('.$field.')/V[';
  foreach($val as $opt)
  $data.='('.trim($opt).')';
  $data.=']&gt;&gt;';
  }else{
  $data.='&lt;&lt;/T('.$field.')/V('.trim($val).')&gt;&gt;';
  }
  }
  $data.="] \n/F (".$file.") /ID [ &lt;".md5(time())."&gt;\n] &gt;&gt;".
  " \n&gt;&gt; \nendobj\ntrailer\n".
  "&lt;&lt;\n/Root 1 0 R \n\n&gt;&gt;\n%%EOF\n";
  return $data;
  }
  
  
  
  $fileName = "Template_PDF.pdf";
  $fdf_file = "temporary.fdf";
  $result_file = "Result.pdf";
  $arr['a_variable'] = 'value or a variable';
  
  
  $fdf_data = createFDF($fileName, $arr);
  
  
  if($fp=fopen($fdf_file,'w'))
  {
      fwrite($fp,$fdf_data,strlen($fdf_data));
  }
  else
  {
      echo 'Unable to create file: '.$fdf_file.'&lt;br&gt;';
  }
  fclose($fp);
  exec("pdftk ".$fileName." fill_form ".$fdf_file." output ".$result_file );
  </code></pre>
  
  <p>in this page <a href="https://stackoverflow.com/questions/22171124/input-pdf-format-for-pdftk-form-fill">Input PDF format for PDFTK form fill</a></p>
  
  <p>It work correctly but don't return result.php file because I haven't PDFTK locally or on my site.
  Where I can find it and how I can install it ?  </p>