Database PDF Manafacture

Database PDF Manafacture

Their comes a time when people want stuff printed, and no matter what you do, it will still have to be printed, and if your running big events, then that printing can get pretty troublsome, I was involved in building a little bit of a site, where we wanted to reduce people input in to generating printed documents. Essentially taking the copy and pasting out of the job, and as the posh people say “structering the data”.

 

 

So this meant HTML form to PHP to Databases and then to PDF’s

I used PDF’s as webpages don’t normally print very well and PDF’s are almost everywhere, they give a nice printed page, which you can print, and the most important thing is people understand them.

Tools used

  • jquery
  • PHP
  • MySQL
  • tcpdf
  • HTML

The jquery was use in form validation, as show in a earler post http://patrickrice.net/blog/2013/10/form-validation/

PHP was used to process the forms, in the standard way and then insert the code in to the database, but using Prepared statements and stored procedures (http://php.net/manual/en/pdo.prepared-statements.php)

Then using the database and tcpdf (http://www.tcpdf.org/), you could generate pdfs on the fly from the data base, here is a sample of the code below.

Comments are closed.