Forum How do I...?

Simple example in PHP

Willems
Hi

The convert_file method is always returning false. Can someone help me pls?

require_once 'prince/prince.php';
$prince = new Prince('C:\Program Files%20(x86)\Prince\Engine\bin\prince.exe');
$msg = array();
$file = $prefix.'intranet/prince.html';
if($prince->convert_file($file)){
echo "true";
}else{
echo 'false';
}
mikeday
Is that path correct? Will the %20 unescape to space character? Maybe try installing in C:\Prince and try there. Also, call $prince->setLog() and specify a path that your PHP script has write permissions for.