This is a discussion on how to implement such a PDF form within the alt.comp.lang.php forums, part of the PHP Programming Forums category; I am developing a web site with PHP and MySQL. There are many forms that need to be generated based ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am developing a web site with PHP and MySQL.
There are many forms that need to be generated based on users' information in database, and then let users to complete the rest. Finally the users can print and sign the forms. I think a good way to implement this application is to use Adobe Acrobat to compose form templates in advance. When a user request a form by internet, I will make a copy of its template, and fill some pre-designed entries with his info from the database, and then let him to view it. My questions are 1) how can I fill these pre-designed entries with PHP? 2) Is there any other better way to implement the application? Thank you Kevin |
|
|||
|
Kevin wrote:
> > I am developing a web site with PHP and MySQL. > There are many forms that need to be generated > based on users' information in database, and > then let users to complete the rest. Finally > the users can print and sign the forms. > I think a good way to implement this application > is to use Adobe Acrobat to compose form templates > in advance. Not really... PDF is not like your normal word processing format. If your template contains the word "name", you may not be able to find it if you open your template in a plain-text editor. > When a user request a form by internet, I will make > a copy of its template, and fill some pre-designed > entries with his info from the database, and then > let him to view it. If you want PDF output not modifiable by user, your best bet is to generate PDF from scratch using ClibPDF functions, or PDF functions, or a pure-PHP alternative such as FPDF. You could use PDF forms, but they are user-modifiable, so there will be no guarantee that the signed form will contain the same data as your database. > My questions are > 1) how can I fill these pre-designed entries with PHP? > 2) Is there any other better way to implement the application? I would say that your best bet is to generate PDF from scratch. If you insist on using templates, Rich Text Format (RTF) may suit you better; however, write protection will be more difficult to achieve. Cheers, NC |
|
|||
|
Look into the PDFlib "personalization server"
it basically lets you easily create templates in Acrobat via a plugin then use their php library to insert stuff into the template. I haven't used it, but I'm looking into it. BTW. it's commercial ware the freeware ver without these helpful abilties is bundled with PHP http://www.pdflib.com/products/pdflib/pps.html |
|
|||
|
"BKDotCom" wrote:
> Look into the PDFlib "personalization server" > it basically lets you easily create templates in Acrobat via a plugin > then use their php library to insert stuff into the template. > I haven't used it, but I'm looking into it. > BTW. it's commercial ware > the freeware ver without these helpful abilties is bundled with PHP > http://www.pdflib.com/products/pdflib/pps.html > Thank you. The PDFlib product could be an option, though I am not sure if it is too expensive. Any other suggestions from any one? |
|
|||
|
Kevin wrote:
> "BKDotCom" wrote: > >>Look into the PDFlib "personalization server" >>it basically lets you easily create templates in Acrobat via a plugin >>then use their php library to insert stuff into the template. >>I haven't used it, but I'm looking into it. >>BTW. it's commercial ware >>the freeware ver without these helpful abilties is bundled with PHP >>http://www.pdflib.com/products/pdflib/pps.html >> > > > Thank you. The PDFlib product could be an option, though I am not > sure if it is too expensive. Any other suggestions from any one? > > > As NC mentioned, try FPDF. I've had good success with it, and the price is right. $0 :-) http://www.fpdf.org/ |
|
|||
|
You could look into flash paper...
Flash has a remarkable printing capability... and it gives you the general look and feel of PDF documents without having to use acrobat or any other viewer... And since we're talking flash, it's easy to insert values into it... |