PDFTK, php, & fill_form
Anyone know how to save a form filled PDF to the server rather than outputting to the browser in PHP?
I have a script that merges PDFs, saves the file and then gives the browser the option to open or save:
exec("pdftk " . $str . " cat output audit.pdf");
I also have a script that takes form data and merges it to a PDF, *BUT* it only outputs to the browser:
passthru("pdftk form.pdf fill_form " . $fdf_fn . " output - flatten");
What I want is to just save the PDF file on the server after the user submits the form data.
I was thinking to try this:
exec("pdftk form.pdf fill_form " . $fdf_fn . " output application.pdf flatten");
...but this doesn't work. I would think removing the passthru() and "output -" would fix it since those are used if you just want a temp file to load into the browser. Any ideas ?
Thanks.
Last edited by jb8578; 02-07-2007 at 05:35 PM.
|