Page 1 of 1
PDF as Form, Sent via server not email client
Posted: Wed Apr 25, 2012 11:04 am
by BillImhoff
Does anyone know how I can have an online pdf as a form and then send it from my server to an email address as an attachment? I dont want the person filling this out to have to use their email client. My server is running LAMP, not a windows server.
Thanks in advance!

Re: PDF as Form, Sent via server not email client
Posted: Wed Apr 25, 2012 11:19 am
by x_mutatis_mutandis_x
You can have them download the PDF, enter info in the PDF, and then have them upload the file, after which you send that file to person's email as an attachment (
http://webcheatsheet.com/PHP/send_email ... chment.php);
Or if you don't want them to download the file, have a HTML form that lets them fill out the info, and you can generate the PDF on the server (using FPDF), after which you can send the email
Re: PDF as Form, Sent via server not email client
Posted: Wed Apr 25, 2012 11:36 am
by BillImhoff
Any other answers?
Re: PDF as Form, Sent via server not email client
Posted: Wed Apr 25, 2012 11:50 am
by Celauran
x_mutatis_mutandis_x wrote:Or if you don't want them to download the file, have a HTML form that lets them fill out the info, and you can generate the PDF on the server (using FPDF), after which you can send the email
I think this is probably the best way to go.
Re: PDF as Form, Sent via server not email client
Posted: Wed Apr 25, 2012 12:27 pm
by BillImhoff
It does not acomplish what I need to do. I dont need a work around. Their is alredy a simple wat to do this using clients email ( as a handler) adobe life cycle. What I need ifs to interface using CGI. Thanks
Re: PDF as Form, Sent via server not email client
Posted: Wed Apr 25, 2012 12:35 pm
by x_mutatis_mutandis_x
BillImhoff wrote:It does not acomplish what I need to do. I dont need a work around. Their is alredy a simple wat to do this using clients email ( as a handler) adobe life cycle. What I need ifs to interface using CGI. Thanks
IMHO it's easier using PHP. There's a library called HTML2PDF which is a convinient wrapper over FPDF
http://html2fpdf.sourceforge.net/. It should be relatively simple to build the HTML form, use this library to convert it to PDF once the form is filled and submitted. Why would it matter if the user enters info into a PDF or HTML form when they would look the same?
Re: PDF as Form, Sent via server not email client
Posted: Wed Apr 25, 2012 1:28 pm
by BillImhoff
If they look the same thats ok with me. I just need the email recipiant to be able to print out the information and it look the same as the form. Will this do that? Thanks again.
I dont think I understand the link you sent me to. I have the pdf already made. Im not sure what to do. Can you help?
Re: PDF as Form, Sent via server not email client
Posted: Wed Apr 25, 2012 2:16 pm
by x_mutatis_mutandis_x
Convert that PDF to HTML (you can search for "convert PDF to HTML" in google), and publish the HTML for the users to enter data. Capture it (and process) in PHP, and email the HTML with filled-data fields to the user. You don't have to maintain a PDF file at all.
Re: PDF as Form, Sent via server not email client
Posted: Wed Apr 25, 2012 4:46 pm
by BillImhoff
The 2 areas "Capture it (and process) in PHP, and email the HTML with filled-data fields to the user. " that the trick. The other thing is what will it look like when they print it out? I need it to look the same as the form.
Re: PDF as Form, Sent via server not email client
Posted: Thu Apr 26, 2012 10:03 am
by x_mutatis_mutandis_x
BillImhoff wrote:The 2 areas "Capture it (and process) in PHP, and email the HTML with filled-data fields to the user. " that the trick. The other thing is what will it look like when they print it out? I need it to look the same as the form.
By capturing it in PHP I mean simple form submission, and accessing the $_POST values. If you want it to look exactly the same as your PDF, test it out. Print the HTML out and see how it looks (if it looks different than your PDF, tweak your HTML; make sure to test against most commonly used browsers like Firefox, Chrome, IE, Safari).
Send a test email to yourself and see how it shows up. Unless you check it out and test it, neither you nor I can tell you if it'll match your PDF or not
Re: PDF as Form, Sent via server not email client
Posted: Fri Apr 27, 2012 1:24 am
by harrybro
I dont think I understand the link you sent me to. I have the pdf already made. Im not sure what to do. Can you help?
Harry Bro...