Fill in PDF values using HTML form and PHP or ASP

I'm looking at for a way to fill in a PDF using an HTML form, processed in PHP or ASP (possibly ASP.NET)

I've found a few things, but no tutorials  Any suggestions?

Thanks for your help!!!
LVL 1
slightlyoffAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
have you looked at aspPDF? It can do all of this in both classic asp and .NET.

http://www.asppdf.com/
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
and the .NET version:

http://www.asppdf.net/
0
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
I think php will be the way to go.   If you must use your asp code that is fine.  Set up the php file to do exactly what you need.  Then get the php page to work by accepting a form post.  When you post, in addition to the data, add some type of pass code or md5/sha hash as the pass for extra security.  Either is fine for this but you might as well use shap.    Then from your asp page, just do an xmlhttppost to the php and include your secret password or hash.  


Using fpdf http://www.fpdf.org/ there is a simple solution http://www.experts-exchange.com/Programming/Languages/Scripting/PHP/Q_26284685.html#a33074463

<?php
$fdf = fdf_create();
fdf_set_value($fdf, "pdf-fieldname", $value);
fdf_set_file($fdf, "http://yoursite/file.pdf");
fdf_save($fdf, "summary.fdf");
fdf_close($fdf);
Header("Content-type: application/vnd.fdf");
$fp = fopen("summary.fdf", "r");
fpassthru($fp);
unlink("summary.fdf");
?>

Open in new window


IF you don't need to save the pdf http://koivi.com/fill-pdf-form-fields/ 

Simple create your own on the fly http://www.fpdf.org/

itexthsarp
http://sourceforge.net/projects/itextsharp/
http://itextpdf.com/learn
http://www.4guysfromrolla.com/articles/030211-1.aspx
http://www.mikesdotnetting.com/Article/86/iTextSharp-Introducing-Tables
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Ray PaseurCommented:
Both PHP scripts FPDF and TCPDF (Google them) work quite well.  If you can show us the form, I can probably show you examples of how to get the information from the form into the PDF document.
0
slightlyoffAuthor Commented:
Thanks everyone for the help!

Basically, my goal is to ask simple questions in a PHP form that will make it easier for people to fill out complicated government forms.

So I don't want to generate a new PDF - which I've found some examples on how to do,  I just want to use the form data to fill out an existing PDF and allow the user to either save it to their computer, or print it out.  I actually don't need to save it to the server.

I will take a look at FDF Scot, as well as the ASP solution provided by Monty - although I might not be able to install anything on my ASP server (shared environment) - I can probably install something on the PHP server.

Ray, thanks for your offer to help.  I haven't created the form yet, but below I've created a simple form that would be perfect for an example:

Again, the unfilled PDF would reside on the server, but there is no need to save back to it.

  <form action="procPage.php" method="post">
Please enter your full name (last name, first name) <input type="text" name="fullName"><br>
Please state the reason for your existence (in five words or less) <input type="text name="reasonforlife"><br/>
<input type="submit" value="Send it!">
</form>

Open in new window


Naturally the form would be more complex, but I'm sure I could take it from there...

Thank you all very much for your help!
0
Ray PaseurCommented:
use the form data to fill out an existing PDF...
Sorry, I don't know how to do that.  Best of luck with the project, ~Ray
0
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
You just need to create the xml and that is what this does IF you don't need to save the pdf http://koivi.com/fill-pdf-form-fields/
0
slightlyoffAuthor Commented:
I was able to get someone to help - and we used FPDF.org.  Thank you for your help - and sorry for the delay in responding.
I've been trying to use different means and we finally got it set up.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.