savagenoob Posted February 12, 2009 Share Posted February 12, 2009 I can create the file using the PDF template, but cant open the FDF file. When you open the FDF it actually opens the PDF template with the data filled it, and when I try to open this with the script it says it cannot find the file and I assume it is talking about the PDF template... How do I modify this to open the PDF with the FDF data.... <?php $data['date']=date('Y-m-d H:i:s'); require_once 'createFDF.php'; $fdf_file=time().'.fdf'; $fdf_dir=dirname(__FILE__).'/Forms'; $pdf_doc='/BrokerAgreement.pdf'; $fdf_data=createFDF($pdf_doc,$data); if($fp=fopen($fdf_dir.'/'.$fdf_file,'w')){ fwrite($fp,$fdf_data,strlen($fdf_data)); echo $fdf_file,' written successfully.'; header("Content-Disposition: attachment; filename=$fdf_file"); Header("Content-type: application/pdf"); $fd = fopen($fdf_dir.'/'.$fdf_file , "r"); fpassthru($fd); unlink($fdf_file); ?> Link to comment https://forums.phpfreaks.com/topic/144869-fdf-open-pdf-problem/ Share on other sites More sharing options...
savagenoob Posted February 13, 2009 Author Share Posted February 13, 2009 No one knows how to open an FDF file after its been created? I really need to figure this out... Link to comment https://forums.phpfreaks.com/topic/144869-fdf-open-pdf-problem/#findComment-760993 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.