Dinamically creating a member ID card as pdf using PHP?

Posted by aefxx on Stack Overflow See other posts from Stack Overflow or by aefxx
Published on 2010-02-03T10:35:14Z Indexed on 2010/03/24 1:03 UTC
Read the original article Hit count: 451

Filed under:
|
|
|
|

I need to code a PHP script that would let me generate a pdf file which displays a member ID card (something like a credit card used to identify oneself) at a certain resolution.

Let me explain:
I do have the basic blueprint of the card in png file format. The script needs to drop in a member's name and birth day along with a serial. So far, no problem - there are plenty of good working PHP librarys out there.

My problem is to ensure that the resulting pdf (the generated image of the card, to be precise) meets a certain resolution (preferably 300dpi), so that printing it would look right.

Any ideas?

EDIT
I solved it using the TCPDF library which let's you scale images at a certain resolution.
Get it here: http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf

© Stack Overflow or respective owner

Related posts about php

Related posts about pdf