|
Posted by NC on 10/08/35 11:27
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
[Back to original message]
|