I am trying to write a PHP script that uses the pdftk app to merge an XFDF with a PDF form and output the merged PDF to the user. According to the pdftk documentation, I can
1) Why are you outputting to standard out and then putting that stuff into a file? Why not just have pdftk dump to the file, i.e.
exec("pdftk blankform.pdf fill_form formdata.xfdf output filledform.pdf");
2) Use proc_open(). Feel free to post any problems you have with the function.
proc_open()