title: Use wkhtmltopdf to set landscape orientation
body: <p>How I can change the orientation of my <code>pdf</code> file which is generated with <code>Wkhtmltopdf</code>.  I invoke it in PHP like following: </p>
  
  <pre><code>$file = fopen("tmp/html/pdfTmp_$numRand.html", 
      "w") or exit("Unable to open file!");
  fwrite($file, $html);
  fclose($file);
  
  exec("..\library\wkhtmltopdf\wkhtmltopdf " . 
      "tmp/html/pdfTmp_$numRand.html tmp/pdf/pdfTmp_$numRand.pdf");
  
  header('Content-Description: File Transfer');
  header('Content-Type: application/octet-stream');
  header("Content-Disposition: attachment; filename=".$nom."_".$residence.".pdf");
  header('Content-Transfer-Encoding: binary');
  header('Expires: 0');
  header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
  header('Pragma: public');
  header('Content-Length: ' . filesize("tmp/pdf/pdfTmp_$numRand.pdf"));
  ob_clean();
  flush();
  readfile("tmp/pdf/pdfTmp_$numRand.pdf");
  </code></pre>
  
  <p><code>$html</code> contains my whole page in html, and this opens a temporary file.</p>
  
  <p>This generates a <code>.pdf</code> in portrait orientation.  I know wkhtlktopdf has an option <code>-O landscape</code> to change orientation, but I don't know where and how I can write this in my PHP script.  I'm using Windows 7.</p>