I'm working on a job applicant tracking system, and I would
like to add a button that allows the administrator to populate a
PDF employment application template with basic applicant
information, then email the populated PDF to the applicant.
I already have a working button to populate the template and
display it in a browser:
What I can't figure out is how to create the custom PDF,
email it, then delete it off the server without turning the process
into a 3-stage "wizard".
IE: Stage 1, create PDF with temporary filename, then click
Stage 2, verify temporary PDF file has been created, then
email it as an attachment, then click Next.
Stage 3, Click Finish to trigger deleting the temporary file.
Is there an elegant way to do this all in one step? Maybe
delay each step until the last one is verified completed? And/or
keep the temporary PDF in RAM instead writing it to disk then
I would use an html form myself. The user completes and
submits it to an action page that:
a. validates and processes the form input.
b. uses cfdocument to create a pdf file
c. uses cfmail to mail said file.
d. uses cffile to delete said file.
You have to create the file if you are going to send it as an
attachment. The alternative would be to try to send something in
pdf format as the email body, but that might not work so well on
the email client.