This is what I have currently:
User submits form data and gets a "download PDF" link.
The link points to script which generates an XFDF file on the fly and outputs the XFDF file after setting the appropriate headers, etc.
The XFDF file points to a password-protected PDF, which is the generic PDF form that uses the XFDF data to fill in the fields.
What I would like:
User clicks the "download PDF" link.
XFDF is generated on the fly (no file written to server).
PDF and XFDF are merged server-side using generic PDF. Contents of final PDF are output to user same as XFDF was originally.
Neither the XFDF nor the final PDF are ever saved to server.
I was looking at pdftk, which has a few options for dealing with FDF/XFDF files, but all of which assume that a) the original XFDF file exists as a file on the server and b) that the resulting PDF should be output as a file on the server.
Also, pdftk is 4 years old.
I was wondering if:
a) there was a newer equivalent to pdftk out there?
b) if there was a way, using a newer pdftk-like tool or using pdftk, to use dynamic paths so that the data never has to exist in file form on the server?
I recently learned about the built-in input/output streams using php://
but I'm still really fuzzy on how to use it, but maybe this would be a good place for this?