View Full Version : [other] fill_form not filling proper dropdown values

July 18th, 2011, 03:34 PM
i am using the below code to create FDF file through pdf form

function createFDF($file,$info){
$data="%FDF-1.2\n%\n1 0 obj\n<< \n/FDF << /Fields [ ";
foreach($info as $field => $val){
foreach($val as $opt)
$data.="] \n/F (".$file.") /ID [ <".md5(time()).">\n] >>".
" \n>> \nendobj\ntrailer\n".
"<<\n/Root 1 0 R \n\n>>\n%%EOF\n";
return $data;

and pdftek command to create pdf from FDF file

pdftk pdftest.pdf fill_form $inputfile output $ouputfile
the value in fdf file is correct but not in created pdf file from it.