Still having some issues. It may be related to my directories. I'm not in the root. I'm running everything from a directory called PDF. Maybe I should just go to the root?
This is what it looks like:
if($fp=fopen($fdf_dir.'/'.$fdf_file,'w')){
fwrite($fp,$fdf_data,strlen($fdf_data));
echo $fdf_file,' written successfully.';
}else{
die('Unable to create file: '.$fdf_dir.'/'.$fdf_file);
}
$fdf_file="CMS".$focus->caseid.".fdf";
$pdf_file="CMS".$focus->caseid.".pdf";
$fdf_dir=".\\pdf\results\\";
exec('pdftk test.pdf fill_form '.$fdf_dir.$fdf_file.' output '.$fdf_dir.$pdf_file.' flatten');
exec('del '.$fdf_dir.$fdf_file);
fclose($fp);
}
}else{
echo 'You did not submit a form.';
}
?>