Utilisez wkhtmltopdf pour définir l'orientation paysage

Comment je peux changer l'orientation de mon pdf fichier qui est généré avec Wkhtmltopdf. J'invoque en PHP comme suit:

$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");

$html contient l'ensemble de ma page en html, et cela ouvre un fichier temporaire.

Cela génère un .pdf en orientation portrait. Je sais wkhtlktopdf a une option -O landscape à changer d'orientation, mais je ne sais pas où et comment je peux écrire ceci dans mon script PHP. Je suis sous Windows 7.

source d'informationauteur Daykeras