i created a system using php.. on my system..there is a form...in that form has a submit button and view in pdf button .. so my question is how to transform my php form into pdf form..user can view the form in pdf format even he did not submit the form yet and the details that he enter is appear in the pdf format form..please help me..
Asked
Active
Viewed 545 times
0
-
Are you wanting to have a PDF form or a PDF document that has the fields filled in that the user supplied? – Chris Thompson Oct 08 '10 at 00:50
-
i want the pdf document that has the fields that are filled by user.. – Beginner Pogrammer Oct 08 '10 at 01:05
-
If I understand you correctly, you are essentially asking how to generate a PDF form from PHP. There are several existing questions for this, e.g. http://stackoverflow.com/questions/2417315/generate-pdf-report-from-php – Pekka Oct 08 '10 at 01:44
-
See also [List of HTML to PDF converters](http://stackoverflow.com/questions/3178448/list-of-html-to-pdf-converters) – Pekka Oct 08 '10 at 01:45
1 Answers
0
You'll need to create the form in Acrobat Pro, PDFpen Pro, FoxIt Reader (with appropriate add-ons), etc. In doing that, you can include a form control button that submits the form values to a URL as POST. Write a PHP script to receive that POST similar to an HTML form POST, and you're good to go.
From there, you just post the PDF to your site and let the visitor's PDF tools do the rest.
Note that form validation is also handled in-PDF. The tool you use to create the form will include a bunch of ready-to-go validations you can use (e.g., phone number or social security number), and if something's missing, you can incorporate JavaScript. Note that the JS runs in the PDF reader, not the browser, so it'll work even if the user has JS turned off.

mr. w
- 2,348
- 1
- 21
- 26
-
I want to use the php form because my client needs the form on php and user can filled the form on that php format because it needs a layout things such as sidebar and so on..on the pdf format,it only show a form and the details only and not include the layout.. on the pdf user only can view and save the form... – Beginner Pogrammer Oct 08 '10 at 01:29