We are wanting to make it easier for users to fill out a multi-page PDF document. Currently, the PDF asks for the same information (name, address, phone etc..) multiple times on a few different pages. To reduce the time it takes to complete these forms, we would like to collect the most common info in a web form first, then apply it to the PDF automatically for the user so they do not have to repeat the same info throughout the forms.
I have two PDF files that contain input forms to be completed by the user. These forms are currently interactive, and allow the user to populate the fields digitally, or by printing it out and filling it out by hand.
I built a DB that stores basic contact information like address, first last name, phone number etc. The user logs in, populates the basic contact information in a web form and clicks 'submit'. This creates the record in the DB of their information, to be retrieved later when the PDF is generated. I have already built the functionality described above, and need help with the following:
HERE IS WHAT I NEED:
1) When a user clicks the 'DOWNLOAD CUSTOM PDF' button, they should be prompted to download a PDF, which should already contain the info from the DB already populated in the correct fields in the PDF form.
For example, the 'First Name' and 'Last Name' fields should contain the users first and last name, taken from the DB.
2) Also in the center of each page of the PDF should contain a watermark that reads "DRAFT COPY - NOT FOR DMV SUBMISSION", and the date and time the file was generated. This watermark should be removed if the DB Table field 'approvalFlag' contains a '1'. This variable is set by the administrator in the backend management page, which I will also build myself.
I am somewhat familiar with FPDF, but am not sure what the best approach would be to achieve this.