I was trying to create a pdf from an FDF file. I have created the FDF file succesfully. But when i try to convert it into pdf i get some errors. Below is the part of my code. the test.pdf file open in a download box and when i try to open it gives error "couldn't open test.pdf because it is either not supported file type or has been damaged"
if($fp=fopen($fdf_file,'w')){
fwrite($fp,$fdf_data,strlen($fdf_data));
echo $fdf_file,' written successfully.';
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="test.pdf"');
passssthru("pdftk test.pdf fill_form test.fdf output - ");
exit;
}else{
die('U