PDF generation with editable fields

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

PDF generation with editable fields

Post by Todd_Z »

I'm looking to create a script that generates dynamic PDFs in PHP which include editable fields so that the user would be able to enter in specific information that is not already stored in the database.

Has anyone seen a library that includes this functionality? I couldn't find it in any of the popular pdf library docs.
User avatar
andym01480
Forum Contributor
Posts: 390
Joined: Wed Apr 19, 2006 5:01 pm

Post by andym01480 »

Section 8.6 of the PDF Reference Manual 6.9MB download! talks about interactive forms. Good luck, was a bit over my head!

http://partners.adobe.com/public/develo ... ence16.pdf
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

So I've been fooling around with the pdf libraries, and I'm having a hell of a time, not to mention I can't find a library which can utilize editable fields.

I have a bunch of forms, i.e. real estate contacts / leases which are going to be populated with static information, as well as dynamic information.

Anyone have any similar scripts?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

If you can generate PDF's with database data or static variable assignments, then assigning $_POST vars shouldn't be that much different. Am I wrong?

EDIT | I just googled searched PHP PDF Generation and found some pretty cool results.
bdlang
Forum Contributor
Posts: 395
Joined: Tue May 16, 2006 8:46 pm
Location: Ventura, CA US

Post by bdlang »

Notice the first result in the Google search mentioned by Everah is FPDF. I've worked with this a bit and had decent (not perfect) results. At least it's free and relatively easy to work with and extend. ;)
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

an easy alternative is to generate .fdf files from pdf forms. You can then easily manipulate the variable values and call you .pdf file from your .fdf file and dump in the dynamic information.

I do it on several of my web sites and it works without a hitch.
Post Reply