Link to home
Start Free TrialLog in
Avatar of williery10
williery10

asked on

How to create a pdf file for download with PHP

Hi there,
been looking a straight forward way of doing the following but am getting lost with all the difference options and would prefer to ask the experts.

My users do a test, and once they pass they get a certificate stating that they have passed this test. I would like to create a pdf certificate file they can download. It will be a simple file with a certificate template  and the users details added dynamically (user name, test, result  and date).

What is the easiest way of doing this?

Thanks in advance
Williery
ASKER CERTIFIED SOLUTION
Avatar of Gauthier
Gauthier

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gauthier
Gauthier

@Ray Pasteur
fPDF and some of their fork (mPDF) were the first choices I examined. Using them, I would either end up with a 2MB pdf with a big jpg background or 50000 lines of php code to draw all the lines, arcs, texts I needed to maintain the corporate identity, svg logo etc.
Support of EPS to act as a template is critical to this kind of work.
Whatever.  

I've never seen anything that created a 2MB PDF or a need for "50000 lines of php code" -- in fact, I've used these classes in production deployments with great satisfaction.  They require a work effort that takes meticulous attention to detail (all document layouts require this), and once they are working, they are both fast and accurate, down to 1/100 inch.  This seems to be one of those technical hurdles that the industry has already jumped, and does not need to jump again.

I guess the central issue is "Does the client need to embed vector-based Adobe Illustrator (AI) or AI compatible EPS files?"  For a certificate application with a template and some text-based insertions, the base classes might be enough to do the job.